Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tri 224 changelog workflow #267

33 changes: 33 additions & 0 deletions .github/workflows/changelog-updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Check if CHANGELOG file was modified in PR"

on:
pull_request:
branches: main
paths-ignore:
- '**/*.txt'
- '.config/**'
- 'docs/**'
- 'local/**'

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read

name: changelog-check
steps:
- uses: actions/checkout@v4

- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16

Check warning on line 24 in .github/workflows/changelog-updates.yaml

View workflow job for this annotation

GitHub Actions / Analyze

[MEDIUM] Unpinned Actions Full Length Commit SHA

Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.

Check warning

Code scanning / KICS

Unpinned Actions Full Length Commit SHA Warning

Action is not pinned to a full length commit SHA.
id: verify-changed-files
with:
files: |
CHANGELOG.md

- name: When CHANGELOG did not change
if: steps.verify-changed-files.outputs.files_changed == 'false'
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ cp local/development/commit-msg .git/hooks/commit-msg && chmod 500 .git/hooks/co

For further information please see https://github.com/hazcod/semantic-commit-hook

## Code formatting
Please use the following code formatter: https://github.com/eclipse-tractusx/item-relationship-service/tree/main/.idea/codeStyles

## Contact

Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ maven/mavencentral/io.rest-assured/xml-path/5.3.0, Apache-2.0, approved, #9267
maven/mavencentral/io.rest-assured/xml-path/5.3.2, Apache-2.0, approved, #9267
maven/mavencentral/io.suzaku/boopickle_2.13/1.3.3, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.15, Apache-2.0, approved, #5947
maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.16, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.16, Apache-2.0, approved, #11362
maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, approved, #5929
maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.15, Apache-2.0, approved, #5919
maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.2, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static SupplyChainImpacted jobContainsIncidentBPNSs(
final PartSiteInformationAsPlanned partSiteInformationAsPlanned, final List<String> incidentBPNs)
throws InvalidAspectTypeFormatException {
if (partSiteInformationAsPlanned.sites().stream().anyMatch(site -> site.catenaXSiteId() == null)) {
throw new InvalidAspectTypeFormatException("Site does not contain catenaXSiteId.");
throw new InvalidAspectTypeFormatException("'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found.");
}
final List<String> siteIds = partSiteInformationAsPlanned.getCatenaXSiteId();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void shouldCreateTombstoneWhenSiteIdIsMissing() throws EdcClientException {
final Optional<BpnInvestigationJob> job = bpnInvestigationJobCache.findByJobId(jobId);
assertThat(job).isPresent();
assertThat(job.get().getJobSnapshot().getTombstones()).hasSize(1);
assertThat(job.get().getJobSnapshot().getTombstones().get(0).getProcessingError().getErrorDetail()).isEqualTo("Site does not contain catenaXSiteId.");
assertThat(job.get().getJobSnapshot().getTombstones().get(0).getProcessingError().getErrorDetail()).isEqualTo("'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found.");
}

private void createMockForJobIdAndShell(final UUID mockedJobId, final String mockedShell,
Expand Down
2 changes: 1 addition & 1 deletion local/testing/api-tests/irs-api-tests.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ stages:
- function: local.testing.api-tests.tavern_helpers:supplyChainImpacted_is_Unknown
- function: local.testing.api-tests.tavern_helpers:tombstone_for_EssValidation_are_correct
extra_kwargs:
expectedTombstone: "Site does not contain catenaXSiteId."
expectedTombstone: "'PartSiteInformationAsPlanned' exists, but catenaXSiteId could not be found."
headers:
content-type: application/json

Expand Down
Loading