From a3d8c3cc2a3f531edae2ff6589763e8443d12fec Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 09:33:57 +0100 Subject: [PATCH 01/18] SD-1667 Check if files are changed which are not allowed to change; add GitHub Action * Also add .gitignore to exclude default locations while working with an IDE --- .github/forbidden_changes.txt | 4 ++ .github/workflows/check_forbidden_changes.yml | 58 +++++++++++++++++++ .idea/.gitignore | 4 ++ 3 files changed, 66 insertions(+) create mode 100644 .github/forbidden_changes.txt create mode 100644 .github/workflows/check_forbidden_changes.yml create mode 100644 .idea/.gitignore diff --git a/.github/forbidden_changes.txt b/.github/forbidden_changes.txt new file mode 100644 index 000000000..d76f6f41e --- /dev/null +++ b/.github/forbidden_changes.txt @@ -0,0 +1,4 @@ +bkg/v1/bkg.yaml +bkg/v1/bkg_v1.0.0.yaml +bkg/v1/bkg_v1.0.0-Beta-1.yaml +bkg/v1/bkg_v1.0.0-Beta-2.yaml diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml new file mode 100644 index 000000000..70720f803 --- /dev/null +++ b/.github/workflows/check_forbidden_changes.yml @@ -0,0 +1,58 @@ +name: Check Forbidden Changes + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: [master] + +jobs: + check_changes: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Load forbidden paths + id: forbidden_paths + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + try { + const forbiddenPaths = fs.readFileSync('.github/forbidden_changes.txt', 'utf8').split('\n').filter(path => path.trim() !== ''); // Read and filter empty lines + return forbiddenPaths; + } catch (error) { + core.setFailed('Could not read forbidden paths file: ' + error.message); + return []; // Return empty array to avoid script failing + } + + - name: Check for forbidden changes + id: check_changes + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; + const changedFiles = context.payload.pull_request.files; + + let violations = []; + + changedFiles.forEach(file => { + forbiddenPaths.forEach(forbiddenPath => { + const regex = new RegExp(forbiddenPath); // Use regex for matching + if (regex.test(file.filename)) { + violations.push(file.filename); + } + }); + }); + + if (violations.length > 0) { + core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); + // Create a comment on the PR + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` + }); + } \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..d6559112e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,4 @@ +/workspace.xml +.idea/ +*.iml +.vscode/ \ No newline at end of file From a0bb8403accb2879bf6ce1e054787ff6c07df98c Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 09:44:44 +0100 Subject: [PATCH 02/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 80 +++++++++++++------ 1 file changed, 57 insertions(+), 23 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 70720f803..f43f7f081 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -26,33 +26,67 @@ jobs: return []; // Return empty array to avoid script failing } - - name: Check for forbidden changes - id: check_changes + - name: Get changed files + id: changed_files uses: actions/github-script@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; - const changedFiles = context.payload.pull_request.files; + const { owner, repo } = context.repo; + const pull_number = context.issue.number; // For PRs + + const response = await github.rest.pulls.listFiles({ + owner, + repo, + pull_number, + per_page: 100 // Adjust per_page if you expect a very large number of changed files + }); + + const changedFiles = response.data.map(file => file.filename); + + core.setOutput('changed_files', changedFiles.join(',')); // Set the output + + // Optionally, log the files to the console (for debugging) + console.log('Changed files:', changedFiles); - let violations = []; + - name: Use the changed files + run: | + echo "Changed files: ${{ steps.changed_files.outputs.changed_files }}" + # You can now use the list of changed files in subsequent steps + # For example, loop through them: + for file in ${{ steps.changed_files.outputs.changed_files }}; do + echo "Processing file: $file" + # Perform actions based on the changed file + done - changedFiles.forEach(file => { - forbiddenPaths.forEach(forbiddenPath => { - const regex = new RegExp(forbiddenPath); // Use regex for matching - if (regex.test(file.filename)) { - violations.push(file.filename); - } - }); - }); - if (violations.length > 0) { - core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); - // Create a comment on the PR - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` - }); - } \ No newline at end of file +# - name: Check for forbidden changes +# id: check_changes +# uses: actions/github-script@v6 +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} +# script: | +# const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; +# const changedFiles = context.payload.pull_request.files; +# +# let violations = []; +# +# changedFiles.forEach(file => { +# forbiddenPaths.forEach(forbiddenPath => { +# const regex = new RegExp(forbiddenPath); // Use regex for matching +# if (regex.test(file.filename)) { +# violations.push(file.filename); +# } +# }); +# }); +# +# if (violations.length > 0) { +# core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); +# // Create a comment on the PR +# github.rest.issues.createComment({ +# issue_number: context.issue.number, +# owner: context.repo.owner, +# repo: context.repo.repo, +# body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` +# }); +# } \ No newline at end of file From 6101622ed9e6835f4e081c88b2762597fb57de7a Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:09:54 +0100 Subject: [PATCH 03/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index f43f7f081..ea4cdf231 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -20,10 +20,11 @@ jobs: const fs = require('fs'); try { const forbiddenPaths = fs.readFileSync('.github/forbidden_changes.txt', 'utf8').split('\n').filter(path => path.trim() !== ''); // Read and filter empty lines + console.log("Found valid lines (files): " + forbiddenPaths.length); return forbiddenPaths; } catch (error) { core.setFailed('Could not read forbidden paths file: ' + error.message); - return []; // Return empty array to avoid script failing + return []; } - name: Get changed files @@ -43,10 +44,7 @@ jobs: }); const changedFiles = response.data.map(file => file.filename); - core.setOutput('changed_files', changedFiles.join(',')); // Set the output - - // Optionally, log the files to the console (for debugging) console.log('Changed files:', changedFiles); - name: Use the changed files @@ -60,33 +58,35 @@ jobs: done -# - name: Check for forbidden changes -# id: check_changes -# uses: actions/github-script@v6 -# with: -# github-token: ${{ secrets.GITHUB_TOKEN }} -# script: | -# const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; -# const changedFiles = context.payload.pull_request.files; -# -# let violations = []; -# -# changedFiles.forEach(file => { -# forbiddenPaths.forEach(forbiddenPath => { -# const regex = new RegExp(forbiddenPath); // Use regex for matching -# if (regex.test(file.filename)) { -# violations.push(file.filename); -# } -# }); -# }); -# -# if (violations.length > 0) { -# core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); -# // Create a comment on the PR -# github.rest.issues.createComment({ -# issue_number: context.issue.number, -# owner: context.repo.owner, -# repo: context.repo.repo, -# body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` -# }); -# } \ No newline at end of file + - name: Check for forbidden changes + id: check_changes + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; + # const changedFiles = context.payload.pull_request.files; + console.log("payload.pull_request.files: " + context.payload.pull_request.files); + const changedFiles = ${{ steps.changed_files.outputs.changed_files }}; + + let violations = []; + + changedFiles.forEach(file => { + forbiddenPaths.forEach(forbiddenPath => { + const regex = new RegExp(forbiddenPath); // Use regex for matching + if (regex.test(file.filename)) { + violations.push(file.filename); + } + }); + }); + + if (violations.length > 0) { + core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); + // Create a comment on the PR + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` + }); + } \ No newline at end of file From 11dcba25501dced522a3be348328a6cf834b83a1 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:12:53 +0100 Subject: [PATCH 04/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index ea4cdf231..7e4bb6ba3 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -65,7 +65,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; - # const changedFiles = context.payload.pull_request.files; console.log("payload.pull_request.files: " + context.payload.pull_request.files); const changedFiles = ${{ steps.changed_files.outputs.changed_files }}; From fa2952f2ea3b132d7d1d860491eda7331301edf1 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:14:18 +0100 Subject: [PATCH 05/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 7e4bb6ba3..fe054c119 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -65,7 +65,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; - console.log("payload.pull_request.files: " + context.payload.pull_request.files); + // console.log("payload.pull_request.files: " + context.payload.pull_request.files); const changedFiles = ${{ steps.changed_files.outputs.changed_files }}; let violations = []; From a94c6ce867a092772d614837bcee8619746b8282 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:21:12 +0100 Subject: [PATCH 06/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index fe054c119..49d71faad 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -29,7 +29,7 @@ jobs: - name: Get changed files id: changed_files - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -60,12 +60,11 @@ jobs: - name: Check for forbidden changes id: check_changes - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; - // console.log("payload.pull_request.files: " + context.payload.pull_request.files); const changedFiles = ${{ steps.changed_files.outputs.changed_files }}; let violations = []; From 68e72b4e75a6ba731ce6bf090e892a6dee66205f Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:34:45 +0100 Subject: [PATCH 07/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 49d71faad..b0239a5fb 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -65,15 +65,16 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const forbiddenPaths = ${{ steps.forbidden_paths.outputs.result }}; - const changedFiles = ${{ steps.changed_files.outputs.changed_files }}; + const changedFilesString = '${{ steps.changed_files.outputs.changed_files }}'; + const changedFiles = changedFilesString.split(','); let violations = []; changedFiles.forEach(file => { forbiddenPaths.forEach(forbiddenPath => { const regex = new RegExp(forbiddenPath); // Use regex for matching - if (regex.test(file.filename)) { - violations.push(file.filename); + if (regex.test(file)) { // Changed from file.filename to file + violations.push(file); // Changed from file.filename to file } }); }); @@ -81,7 +82,7 @@ jobs: if (violations.length > 0) { core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`); // Create a comment on the PR - github.rest.issues.createComment({ + await github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, From 26e174ccf0a01321dbf77ae3fcc56c102736270d Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 10:38:46 +0100 Subject: [PATCH 08/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index b0239a5fb..8548cb12d 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -72,9 +72,10 @@ jobs: changedFiles.forEach(file => { forbiddenPaths.forEach(forbiddenPath => { + console.log("Processing file: " + file + " with forbidden path: " + forbiddenPath); const regex = new RegExp(forbiddenPath); // Use regex for matching - if (regex.test(file)) { // Changed from file.filename to file - violations.push(file); // Changed from file.filename to file + if (regex.test(file)) { + violations.push(file); } }); }); From 344a1597ab4f5188724088cf19aae24b703d8350 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 12:14:34 +0100 Subject: [PATCH 09/18] Change forbidden file --- .github/workflows/check_forbidden_changes.yml | 15 ++------------- bkg/v1/bkg_v1.0.0-Beta-2.yaml | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 8548cb12d..650f9b763 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -40,23 +40,12 @@ jobs: owner, repo, pull_number, - per_page: 100 // Adjust per_page if you expect a very large number of changed files + per_page: 100 }); const changedFiles = response.data.map(file => file.filename); core.setOutput('changed_files', changedFiles.join(',')); // Set the output - console.log('Changed files:', changedFiles); - - - name: Use the changed files - run: | - echo "Changed files: ${{ steps.changed_files.outputs.changed_files }}" - # You can now use the list of changed files in subsequent steps - # For example, loop through them: - for file in ${{ steps.changed_files.outputs.changed_files }}; do - echo "Processing file: $file" - # Perform actions based on the changed file - done - + // console.log('Changed files:', changedFiles); - name: Check for forbidden changes id: check_changes diff --git a/bkg/v1/bkg_v1.0.0-Beta-2.yaml b/bkg/v1/bkg_v1.0.0-Beta-2.yaml index ef33f4596..dc68771f0 100644 --- a/bkg/v1/bkg_v1.0.0-Beta-2.yaml +++ b/bkg/v1/bkg_v1.0.0-Beta-2.yaml @@ -14,7 +14,7 @@ info: in order to poll event information. - It is recomended to implement the [DCSA Documentation Event Hub](https://app.swaggerhub.com/apis/dcsaorg/DOCUMENTATION_EVENT_HUB) in order to use the push model. Here events are pushed as they occur. + It is recommended to implement the [DCSA Documentation Event Hub](https://app.swaggerhub.com/apis/dcsaorg/DOCUMENTATION_EVENT_HUB) in order to use the push model. Here events are pushed as they occur. For a changelog please click [here](https://github.com/dcsaorg/DCSA-OpenAPI/tree/master/bkg/v1#v100B2). Please also [create a GitHub issue](https://github.com/dcsaorg/DCSA-OpenAPI/issues/new) if you have any questions/comments. From aab9b67b774c4a68bdb7d706841cd56c2576429c Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 12:18:57 +0100 Subject: [PATCH 10/18] Revert forbidden file --- bkg/v1/bkg_v1.0.0-Beta-2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bkg/v1/bkg_v1.0.0-Beta-2.yaml b/bkg/v1/bkg_v1.0.0-Beta-2.yaml index dc68771f0..ef33f4596 100644 --- a/bkg/v1/bkg_v1.0.0-Beta-2.yaml +++ b/bkg/v1/bkg_v1.0.0-Beta-2.yaml @@ -14,7 +14,7 @@ info: in order to poll event information. - It is recommended to implement the [DCSA Documentation Event Hub](https://app.swaggerhub.com/apis/dcsaorg/DOCUMENTATION_EVENT_HUB) in order to use the push model. Here events are pushed as they occur. + It is recomended to implement the [DCSA Documentation Event Hub](https://app.swaggerhub.com/apis/dcsaorg/DOCUMENTATION_EVENT_HUB) in order to use the push model. Here events are pushed as they occur. For a changelog please click [here](https://github.com/dcsaorg/DCSA-OpenAPI/tree/master/bkg/v1#v100B2). Please also [create a GitHub issue](https://github.com/dcsaorg/DCSA-OpenAPI/issues/new) if you have any questions/comments. From 03173b6734b088b08dbbceb6504203ad277e5109 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 12:21:22 +0100 Subject: [PATCH 11/18] Experiment with regex --- .github/forbidden_changes.txt | 1 + bkg/v1/README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/forbidden_changes.txt b/.github/forbidden_changes.txt index d76f6f41e..14e69c7d7 100644 --- a/.github/forbidden_changes.txt +++ b/.github/forbidden_changes.txt @@ -2,3 +2,4 @@ bkg/v1/bkg.yaml bkg/v1/bkg_v1.0.0.yaml bkg/v1/bkg_v1.0.0-Beta-1.yaml bkg/v1/bkg_v1.0.0-Beta-2.yaml +bkg/v1/* \ No newline at end of file diff --git a/bkg/v1/README.md b/bkg/v1/README.md index b644a72a8..f029c2c62 100644 --- a/bkg/v1/README.md +++ b/bkg/v1/README.md @@ -24,7 +24,7 @@ Release of the DCSA OpenAPI definitions for Booking 1.0.0. This release fixes mi - `eventDateTime` added as new query parameter - Referenced domains above should be consulted to see exact updates - some if the major items include - linkage between `Commodity` and `RequestedEquipment` - - better support for paper-version of B/L (displayedAddress, displaedName...) + - better support for paper-version of B/L (displayedAddress, displayedName...) - `references` and `seals` objects updated - minor updates to the `Party` object (`PartyName` is now mandatory, new `parrtyFunctionCodes`) - confirmed and requested Equipment groups updated From 65ef34657aa247359833c63ebffb35e7ad6c54b7 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 12:24:30 +0100 Subject: [PATCH 12/18] Experiment --- .github/workflows/check_forbidden_changes.yml | 4 ++-- bkg/v1/README.md | 2 +- bkg/v1/bkg.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 650f9b763..750876c8c 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -61,7 +61,7 @@ jobs: changedFiles.forEach(file => { forbiddenPaths.forEach(forbiddenPath => { - console.log("Processing file: " + file + " with forbidden path: " + forbiddenPath); + // console.log("Processing file: " + file + " with forbidden path: " + forbiddenPath); const regex = new RegExp(forbiddenPath); // Use regex for matching if (regex.test(file)) { violations.push(file); @@ -76,6 +76,6 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `The following file(s) are not allowed to be changed: ${violations.join(', ')}` + body: `**Error**: The following file(s) are not allowed to be changed: ${violations.join(', ')}` }); } \ No newline at end of file diff --git a/bkg/v1/README.md b/bkg/v1/README.md index f029c2c62..b644a72a8 100644 --- a/bkg/v1/README.md +++ b/bkg/v1/README.md @@ -24,7 +24,7 @@ Release of the DCSA OpenAPI definitions for Booking 1.0.0. This release fixes mi - `eventDateTime` added as new query parameter - Referenced domains above should be consulted to see exact updates - some if the major items include - linkage between `Commodity` and `RequestedEquipment` - - better support for paper-version of B/L (displayedAddress, displayedName...) + - better support for paper-version of B/L (displayedAddress, displaedName...) - `references` and `seals` objects updated - minor updates to the `Party` object (`PartyName` is now mandatory, new `parrtyFunctionCodes`) - confirmed and requested Equipment groups updated diff --git a/bkg/v1/bkg.yaml b/bkg/v1/bkg.yaml index 65c45f78e..cfba8732f 100644 --- a/bkg/v1/bkg.yaml +++ b/bkg/v1/bkg.yaml @@ -12,7 +12,7 @@ info: in order to poll event information. - It is recomended to implement the DCSA Documentation Event Hub in order to use the push model. Here events are pushed as they occur. + It is recomen ded to implement the DCSA Documentation Event Hub in order to use the push model. Here events are pushed as they occur. license: name: Apache 2.0 From d8499092ccd83c00d6904a4d45b6bd55aaced035 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Thu, 13 Feb 2025 12:26:19 +0100 Subject: [PATCH 13/18] Revert --- bkg/v1/bkg.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bkg/v1/bkg.yaml b/bkg/v1/bkg.yaml index cfba8732f..65c45f78e 100644 --- a/bkg/v1/bkg.yaml +++ b/bkg/v1/bkg.yaml @@ -12,7 +12,7 @@ info: in order to poll event information. - It is recomen ded to implement the DCSA Documentation Event Hub in order to use the push model. Here events are pushed as they occur. + It is recomended to implement the DCSA Documentation Event Hub in order to use the push model. Here events are pushed as they occur. license: name: Apache 2.0 From 3685eafd67159ecf00e1bf508645c508b25c59d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Helm=C3=B8=20Larsen?= Date: Mon, 17 Feb 2025 14:40:34 +0100 Subject: [PATCH 14/18] Update published APIs list List includes: * APIs/Domains that have been published (and are now readOnly) * APIs/Domains that are discontinued * reference data (DCSA will not maintain these lists - for now) --- .github/forbidden_changes.txt | 57 +++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/forbidden_changes.txt b/.github/forbidden_changes.txt index 14e69c7d7..3b1e629f0 100644 --- a/.github/forbidden_changes.txt +++ b/.github/forbidden_changes.txt @@ -1,5 +1,58 @@ -bkg/v1/bkg.yaml bkg/v1/bkg_v1.0.0.yaml bkg/v1/bkg_v1.0.0-Beta-1.yaml bkg/v1/bkg_v1.0.0-Beta-2.yaml -bkg/v1/* \ No newline at end of file +bkg/v2/notification/* +bkg/v2/BKG_v2.0.0.yaml +bkg/v2/BKG_v2.0.0-Beta-1.yaml +bkg/v2/BKG_v2.0.0-Beta-2.yaml +cs/v1/CS_v1.0.0.yaml +cs/v1/CS_v1.0.0-Beta-1.yaml +documentation_event_hub/* +domain/* +ebl/v1/ebl.yaml +ebl/v2/ebl_v2.0.0.yaml +ebl/v2/ebl_v2.0.0-Beta-1.yaml +ebl/v2/ebl_v2.0.0-Beta-2.yaml +ebl/v2/ebl_v2.0.0-Beta-3.yaml +ebl/v3/EBL_v3.0.0.yaml +ebl/v3/ebl_v3.0.0-Beta-1.yaml +ebl/v3/EBL_v3.0.0-Beta-2.yaml +ebl/v3/issuance/EBL_ISS_v3.0.0.yaml +ebl/v3/issuance/ebl_iss_v3.0.0-Beta-1.yaml +ebl/v3/issuance/EBL_ISS_v3.0.0-Beta-2.yaml +ebl/v3/issuance_response/* +ebl/v3/notification/* +ebl/v3/surrender/EBL_SUR_v3.0.0.yaml +ebl/v3/surrender/ebl_sur_v3.0.0-Beta-1.yaml +ebl/v3/surrender/EBL_SUR_v3.0.0-Beta-2.yaml +ebl/v3/surrender_response/* +iot/v1/iot_v1.0.0-Beta-1.yaml +jit/v1/jit_v1.0.0.yaml +jit/v1/jit_v1.1.0.yaml +jit/v1/jit_v1.2.0-Beta-1.yaml +models/* +ovs/v1/ovs.yaml +ovs/v1/ovs_v1.0.0.yaml +ovs/v1/ovs_v1.0.1.yaml +ovs/v2/ovs.yaml +ovs/v2/ovs_v2.0.0.yaml +ovs/v2/ovs_v2.0.1.yaml +ovs/v2/ovs_v2.0.2.yaml +ovs/v3/OVS_v3.0.0.yaml +ovs/v3/ovs_v3.0.0-Beta-1.yaml +ovs/v3/reference-data/* +ovs_event_hub/* +reefer/v1/reefer_v1.0.0-Beta-1.yaml +reference-data/* +tnt/v1/tnt.yaml +tnt/v1/tnt_v1.0.0.yaml +tnt/v1/tnt_v1.1.0.yaml +tnt/v1/tnt_v1.2.0.yaml +tnt/v2/tnt.yaml +tnt/v2/TNT_v2.0.0.yaml +tnt/v2/TNT_v2.0.1.yaml +tnt/v2/TNT_v2.1.0.yaml +tnt/v2/TNT_v2.1.1.yaml +tnt/v2/TNT_v2.1.2.yaml +tnt/v2/TNT_v2.2.0.yaml +tnt/v3/tnt_v3.0.0-Beta-1.yaml From 48d48e2d495438419e1202b5b57400a23ce0b10e Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Mon, 17 Feb 2025 15:10:58 +0100 Subject: [PATCH 15/18] Filter out .md files (covering all readme.md). Move .gitignore to right location and add ignored paths --- .github/workflows/check_forbidden_changes.yml | 2 +- .gitignore | 7 +++++++ .idea/.gitignore | 4 ---- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitignore delete mode 100644 .idea/.gitignore diff --git a/.github/workflows/check_forbidden_changes.yml b/.github/workflows/check_forbidden_changes.yml index 750876c8c..360c0433f 100644 --- a/.github/workflows/check_forbidden_changes.yml +++ b/.github/workflows/check_forbidden_changes.yml @@ -43,7 +43,7 @@ jobs: per_page: 100 }); - const changedFiles = response.data.map(file => file.filename); + const changedFiles = response.data.map(file => file.filename).filter(file => !file.endsWith('.md')); core.setOutput('changed_files', changedFiles.join(',')); // Set the output // console.log('Changed files:', changedFiles); diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..db037fa68 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/workspace.xml +.idea/ +*.iml +.vscode/ +node_modules/ +dist/ +*.log \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index d6559112e..000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/workspace.xml -.idea/ -*.iml -.vscode/ \ No newline at end of file From bb4feecaf703402a642a500bb85f690304f709c5 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Mon, 17 Feb 2025 15:12:51 +0100 Subject: [PATCH 16/18] File allowed to change --- ovs_event_hub/v2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovs_event_hub/v2/README.md b/ovs_event_hub/v2/README.md index f4bc52299..1958aa06f 100644 --- a/ovs_event_hub/v2/README.md +++ b/ovs_event_hub/v2/README.md @@ -4,7 +4,7 @@ The DCSA Interface Standard for Operational Vessel Schedule Event Hub is documen The purpose of an Event Hub is to send events and manage subscriptions. In case of the Operational Vessel Schedule Hub, this hub manages both **TransportEvents and OperationalEvents**. It is only possible to receive **TransportEvents and OperationalEvents** and subscribe to **TransportEvents and OperationalEvents** when implementing this hub. -### Releasenotes +### Release notes ### [v2.0.0 - 1 September 2021](https://app.swaggerhub.com/apis-docs/dcsaorg/OVS_EVENT_HUB/2.0.0) Initial release of the DCSA OpenAPI definitions for Operational Vessel Schedules Event Hub From 089d1fdc5b9c5e090406819292e8b082b2df5957 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Mon, 17 Feb 2025 15:13:48 +0100 Subject: [PATCH 17/18] Not allowed to change --- ovs_event_hub/v2/ovs_event_hub.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovs_event_hub/v2/ovs_event_hub.yaml b/ovs_event_hub/v2/ovs_event_hub.yaml index 997cdec92..4be74105d 100644 --- a/ovs_event_hub/v2/ovs_event_hub.yaml +++ b/ovs_event_hub/v2/ovs_event_hub.yaml @@ -3,7 +3,7 @@ info: version: 2.0.0 title: DCSA Operational Vessel Schedules (OVS) Event Hub description: | - Managing and sending Transport- and Operations- Events and subscriptions for OVS. It is recomended (but not required) that implementors of the Operational Vessel Schedules (OVS) API also implements this API. + Managing and sending Transport- and Operations- Events and subscriptions for OVS. It is recommended (but not required) that implementors of the Operational Vessel Schedules (OVS) API also implements this API. # This API is a subset of DCSA Event Hub which can send and manage all DCSA defined Events. tags: From 89bd6f71b5bc271ffe86b7e9257715862a3d1838 Mon Sep 17 00:00:00 2001 From: "J. Koster" Date: Mon, 17 Feb 2025 15:16:32 +0100 Subject: [PATCH 18/18] Revert other changes, which were tests. --- ovs_event_hub/v2/README.md | 2 +- ovs_event_hub/v2/ovs_event_hub.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ovs_event_hub/v2/README.md b/ovs_event_hub/v2/README.md index 1958aa06f..f4bc52299 100644 --- a/ovs_event_hub/v2/README.md +++ b/ovs_event_hub/v2/README.md @@ -4,7 +4,7 @@ The DCSA Interface Standard for Operational Vessel Schedule Event Hub is documen The purpose of an Event Hub is to send events and manage subscriptions. In case of the Operational Vessel Schedule Hub, this hub manages both **TransportEvents and OperationalEvents**. It is only possible to receive **TransportEvents and OperationalEvents** and subscribe to **TransportEvents and OperationalEvents** when implementing this hub. -### Release notes +### Releasenotes ### [v2.0.0 - 1 September 2021](https://app.swaggerhub.com/apis-docs/dcsaorg/OVS_EVENT_HUB/2.0.0) Initial release of the DCSA OpenAPI definitions for Operational Vessel Schedules Event Hub diff --git a/ovs_event_hub/v2/ovs_event_hub.yaml b/ovs_event_hub/v2/ovs_event_hub.yaml index 4be74105d..997cdec92 100644 --- a/ovs_event_hub/v2/ovs_event_hub.yaml +++ b/ovs_event_hub/v2/ovs_event_hub.yaml @@ -3,7 +3,7 @@ info: version: 2.0.0 title: DCSA Operational Vessel Schedules (OVS) Event Hub description: | - Managing and sending Transport- and Operations- Events and subscriptions for OVS. It is recommended (but not required) that implementors of the Operational Vessel Schedules (OVS) API also implements this API. + Managing and sending Transport- and Operations- Events and subscriptions for OVS. It is recomended (but not required) that implementors of the Operational Vessel Schedules (OVS) API also implements this API. # This API is a subset of DCSA Event Hub which can send and manage all DCSA defined Events. tags: