You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The action failed due to a repository policy check in actions/github-script@v7 that blocks changes to forbidden file paths. The script read patterns from .github/forbidden_changes.txt, compared them against the changed files using regex, and detected a violation: - Forbidden file changed: bkg/v2/BKG_v2.0.0.yaml The script then called core.setFailed(...), causing the GitHub Action to fail with the error: "You are not allowed to change the following file(s): bkg/v2/BKG_v2.0.0.yaml".
Relevant error logs:
1: ##[group]Runner Image Provisioner2: Hosted Compute Agent
...
111: git switch -c <new-branch-name>112: Or undo this operation with:113: git switch -114: Turn off this advice by setting config variable advice.detachedHead to false115: HEAD is now at a946ec5 Merge 55ac62b4663e005b6a3887f1db539cf967088ec5 into 2d2e21a38abab7f3c7aa7b58a3a7d713dd62111d116: ##[endgroup]117: [command]/usr/bin/git log -1 --format=%H118: a946ec549283c4470f897f7fcaa1421b3b554a62119: ##[group]Run actions/github-script@v7120: with:121: script: const fs = require('fs');122: try {123: const forbiddenPaths = fs.readFileSync('.github/forbidden_changes.txt', 'utf8').split('\n').filter(path => path.trim() !== ''); // Read and filter empty lines124: console.log("Found valid lines (files): " + forbiddenPaths.length);125: return forbiddenPaths;126: } catch (error) {127: core.setFailed('Could not read forbidden paths file: ' + error.message);128: return [];
...
167: const changedFiles = changedFilesString.split(',');168:
169: let violations = [];170:
171: changedFiles.forEach(file => {172: forbiddenPaths.forEach(forbiddenPath => {173: // console.log("Processing file: " + file + " with forbidden path: " + forbiddenPath);174: const regex = new RegExp(forbiddenPath); // Use regex for matching175: if (regex.test(file)) {176: violations.push(file);177: }178: });179: });180:
181: if (violations.length > 0) {182: core.setFailed(`You are not allowed to change the following file(s): ${violations.join(', ')}`);183: // Create a comment on the PR184: await github.rest.issues.createComment({185: issue_number: context.issue.number,186: owner: context.repo.owner,187: repo: context.repo.repo,188: body: `**Error**: The following file(s) are not allowed to be changed: ${violations.join(', ')}`189: });190: }191: debug: false192: user-agent: actions/github-script193: result-encoding: json194: retries: 0195: retry-exempt-status-codes: 400,401,403,404,422196: ##[endgroup]197: ##[error]You are not allowed to change the following file(s): bkg/v2/BKG_v2.0.0.yaml198: Post job cleanup.
Remove mandatory requirement text for shipmentCutOffTimes in booking confirmation schema.
Preserve description and structure for shipmentCutOffTimes while making it optional.
Non-compliant requirements:
Align all stated bookingStatus values (CONFIRMED/PENDING_AMENDMENT/COMPLETED/DECLINED) rule enforcement across the API (confirmedEquipments and transportPlan must be present) – not verifiable/implemented in the shown diff.
Requires further human verification:
Confirm that validation logic beyond the schema (e.g., request/response validators, service-level checks) enforces presence of confirmedEquipments and transportPlan for the specified bookingStatus values.
Verify that other API documentation and examples were updated to reflect shipmentCutOffTimes being optional.
The ticket broadens the condition across multiple booking statuses and fields. The diff only removes the mandatory note for shipmentCutOffTimes and adds a condition for Transport being mandatory for CONFIRMED. Verify that validations for PENDING_AMENDMENT/COMPLETED/DECLINED and confirmedEquipments/transportPlan are updated elsewhere.
**Condition:** Mandatory and non-empty for a `CONFIRMED` Bookingitems:
$ref: '#/components/schemas/Transport'shipmentCutOffTimes:
type: arraydescription: | A list of cut-off times provided by the carrier in the booking confirmation. A cut-off time indicates the latest deadline within which a task must be completed. The confirmed schedule cannot be guaranteed if a cut-off time is missed. Customs brokers may set additional cut-off times to receive the export customs documentation, which is not included in the shipment cut-off times of a carrier booking.
Ensure all references to shipmentCutOffTimes mandatory status are removed or updated across the spec (schemas, examples, descriptions) to avoid conflicting guidance.
shipmentCutOffTimes:
type: arraydescription: | A list of cut-off times provided by the carrier in the booking confirmation. A cut-off time indicates the latest deadline within which a task must be completed. The confirmed schedule cannot be guaranteed if a cut-off time is missed. Customs brokers may set additional cut-off times to receive the export customs documentation, which is not included in the shipment cut-off times of a carrier booking.items:
$ref: '#/components/schemas/ShipmentCutOffTime'advanceManifestFilings:
With the mandatory condition removed, add explicit minItems and nullable semantics to avoid ambiguous validation. Clarify in the description that the array may be absent or empty to align clients and servers.
description: |
A list of cut-off times provided by the carrier in the booking confirmation. A cut-off time indicates the latest deadline within which a task must be completed. The confirmed schedule cannot be guaranteed if a cut-off time is missed. Customs brokers may set additional cut-off times to receive the export customs documentation, which is not included in the shipment cut-off times of a carrier booking.
++ This field is optional for `CONFIRMED` bookings and may be omitted or an empty array if no cut-off times apply.+minItems: 0+nullable: true
items:
$ref: '#/components/schemas/ShipmentCutOffTime'
[To ensure code accuracy, apply this suggestion manually]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly proposes adding explicit, machine-readable validation (minItems: 0, nullable: true) to reflect the removal of the human-readable mandatory condition, improving schema clarity and robustness.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
SD-2384: Remove mandatory requirement for
shipmentCutOffTimesPR Type
Enhancement
Description
Remove mandatory requirement for
shipmentCutOffTimesfieldUpdate booking confirmation schema to make cut-off times optional
Diagram Walkthrough
File Walkthrough
BKG_v2.0.0.yaml
Remove mandatory shipmentCutOffTimes requirementbkg/v2/BKG_v2.0.0.yaml
shipmentCutOffTimesfield