Skip to content

Commit cb69084

Browse files
authored
Migrated namespace to ca.trackerfoce (#8)
* Migrated namespace to ca.trackerfoce * nit: removed unused import, added sonar workflow for external PRs
1 parent 47f5ffd commit cb69084

34 files changed

+112
-56
lines changed

.github/workflows/sonar.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Manual SonarCloud Analysis
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr_id:
7+
description: 'Pull Request ID to analyze'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
sonar-analysis:
13+
name: SonarCloud Analysis for PR
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Get PR details
18+
id: pr
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
const pr = await github.rest.pulls.get({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
pull_number: ${{ inputs.pr_id }}
26+
});
27+
core.setOutput('head_ref', pr.data.head.ref);
28+
core.setOutput('base_ref', pr.data.base.ref);
29+
core.setOutput('head_sha', pr.data.head.sha);
30+
31+
- uses: actions/checkout@v4
32+
with:
33+
ref: ${{ steps.pr.outputs.head_sha }}
34+
fetch-depth: 0
35+
36+
- name: Set up JDK 17
37+
uses: actions/setup-java@v4
38+
with:
39+
java-version: 17
40+
distribution: 'temurin'
41+
cache: maven
42+
43+
- name: Build/Test & SonarCloud Scan
44+
env:
45+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
46+
if: env.SONAR_TOKEN != ''
47+
run: |
48+
mvn -B clean verify -Pcoverage,sonar \
49+
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
50+
-Dsonar.pullrequest.key=${{ inputs.pr_id }} \
51+
-Dsonar.pullrequest.branch=${{ steps.pr.outputs.head_ref }} \
52+
-Dsonar.pullrequest.base=${{ steps.pr.outputs.base_ref }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Master CI](https://github.com/trackerforce/dot-path-ql/actions/workflows/master.yml/badge.svg)](https://github.com/trackerforce/dot-path-ql/actions/workflows/master.yml)
22
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=trackerforce_dot-path-ql&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=trackerforce_dot-path-ql)
3-
[![Maven Central](https://img.shields.io/maven-central/v/io.github.trackerforce/dot-path-ql.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/io.github.trackerforce/dot-path-ql)
3+
[![Maven Central](https://img.shields.io/maven-central/v/ca.trackerforce/dot-path-ql.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/ca.trackerforce/dot-path-ql)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55

66
# dotPathQL
@@ -31,7 +31,7 @@ The `DotPathQL` is the core component of this project that allows you to extract
3131

3232
```xml
3333
<dependency>
34-
<groupId>io.github.trackerforce</groupId>
34+
<groupId>ca.trackerforce</groupId>
3535
<artifactId>dot-path-ql</artifactId>
3636
<version>${dot-path-ql.version}</version>
3737
</dependency>
@@ -109,7 +109,7 @@ The utility uses a multi-layered approach to access object properties:
109109
Perfect for creating flexible APIs where clients can specify which fields they need:
110110

111111
```java
112-
import io.github.trackerforce.DotUtils;
112+
import ca.trackerforce.DotUtils;
113113

114114
@GetMapping("/users/{id}")
115115
public Map<String, Object> getUser(

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>io.github.trackerforce</groupId>
7+
<groupId>ca.trackerforce</groupId>
88
<artifactId>dot-path-ql</artifactId>
9-
<version>1.1.0</version>
9+
<version>1.2.0</version>
1010

1111
<name>dot-path-ql</name>
1212
<description>dotPathQL allows object attribute filtering</description>

src/main/java/io/github/trackerforce/DotPathQL.java renamed to src/main/java/ca/trackerforce/DotPathQL.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package io.github.trackerforce;
1+
package ca.trackerforce;
22

3-
import io.github.trackerforce.path.*;
4-
import io.github.trackerforce.path.api.DotPath;
5-
import io.github.trackerforce.path.api.DotPrinter;
3+
import ca.trackerforce.path.DotPathFactory;
4+
import ca.trackerforce.path.api.DotPath;
5+
import ca.trackerforce.path.api.DotPrinter;
66

77
import java.util.Collections;
88
import java.util.List;

src/main/java/io/github/trackerforce/DotUtils.java renamed to src/main/java/ca/trackerforce/DotUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package io.github.trackerforce;
1+
package ca.trackerforce;
22

3-
import io.github.trackerforce.path.DotPathFactory;
3+
import ca.trackerforce.path.DotPathFactory;
44

55
import java.util.Collections;
66
import java.util.List;

src/main/java/io/github/trackerforce/path/DotPathFactory.java renamed to src/main/java/ca/trackerforce/path/DotPathFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package io.github.trackerforce.path;
1+
package ca.trackerforce.path;
22

3-
import io.github.trackerforce.path.api.DotParse;
4-
import io.github.trackerforce.path.api.DotPath;
5-
import io.github.trackerforce.path.api.DotPrinter;
3+
import ca.trackerforce.path.api.DotParse;
4+
import ca.trackerforce.path.api.DotPath;
5+
import ca.trackerforce.path.api.DotPrinter;
66

77
/**
88
* Factory class for creating instances of DotPath and DotPrinter implementations.

src/main/java/io/github/trackerforce/path/ExclusionNode.java renamed to src/main/java/ca/trackerforce/path/ExclusionNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.trackerforce.path;
1+
package ca.trackerforce.path;
22

33
import java.util.HashMap;
44
import java.util.Map;

src/main/java/io/github/trackerforce/path/PathCommon.java renamed to src/main/java/ca/trackerforce/path/PathCommon.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package io.github.trackerforce.path;
1+
package ca.trackerforce.path;
22

3-
import io.github.trackerforce.path.api.DotPath;
3+
import ca.trackerforce.path.api.DotPath;
44

55
import java.lang.reflect.Field;
66
import java.lang.reflect.InvocationTargetException;

src/main/java/io/github/trackerforce/path/PathExclude.java renamed to src/main/java/ca/trackerforce/path/PathExclude.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.trackerforce.path;
1+
package ca.trackerforce.path;
22

33
import java.lang.reflect.Field;
44
import java.lang.reflect.Method;

src/main/java/io/github/trackerforce/path/PathFilter.java renamed to src/main/java/ca/trackerforce/path/PathFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.github.trackerforce.path;
1+
package ca.trackerforce.path;
22

33
import java.util.*;
44

0 commit comments

Comments
 (0)