Skip to content

Conversation

@ryanNexus
Copy link
Contributor

@ryanNexus ryanNexus commented Oct 23, 2025

Description

  • New check to validate that codegen via Xero internal repo succeeds.
  • New way to create GitHub Release.
  • Swapped spectral and yamllint checks for MegaLinter.

Release Notes

Screenshots (if appropriate):

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

@github-actions
Copy link

PETOSS-832

@github-actions
Copy link

Thanks for raising an issue, a ticket has been created to track your request

Comment on lines 12 to 28
runs-on: ubuntu-latest
name: MegaLinter Validation
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: MegaLinter
uses: oxsecurity/megalinter@v9
env:
ENABLE_LINTERS: YAML_YAMLLINT,ACTION_ACTIONLINT,API_SPECTRAL
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
API_SPECTRAL_FILTER_REGEX_INCLUDE: xero.*\.yaml
API_SPECTRAL_RULES_PATH: .spectral/
APPLY_FIXES: none
LOG_LEVEL: INFO

codegen-validation:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 2 months ago

The fix is to add an explicit permissions block to the linting job in .github/workflows/pr-validation.yml. Since the job only performs a lint using checked out code, it only needs read access to the repository contents. Therefore, a permissions block should be added at line 13 (immediately after name: MegaLinter Validation) with contents: read. No further privileges are needed; do not change existing functionality or any other steps. No new dependencies or imports are required.


Suggested changeset 1
.github/workflows/pr-validation.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -11,6 +11,8 @@
   linting:
     runs-on: ubuntu-latest
     name: MegaLinter Validation
+    permissions:
+      contents: read
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
EOF
@@ -11,6 +11,8 @@
linting:
runs-on: ubuntu-latest
name: MegaLinter Validation
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
Copilot is powered by AI and may make mistakes. Always verify output.
@the-chris-mitchell the-chris-mitchell force-pushed the PETOSS-829-add-GHA-healthcheck branch from 5ae644f to f1d9de5 Compare October 28, 2025 01:38
@the-chris-mitchell the-chris-mitchell force-pushed the PETOSS-829-add-GHA-healthcheck branch from caa0208 to 70a0f90 Compare October 28, 2025 03:47
@the-chris-mitchell the-chris-mitchell force-pushed the PETOSS-829-add-GHA-healthcheck branch from 34d2cf6 to a56eb31 Compare October 28, 2025 03:59
@ryanNexus
Copy link
Contributor Author

I Approve this Change, LGTM 🔥

@the-chris-mitchell the-chris-mitchell changed the title [PETOSS-829] Add codegen and commit message testing [PETOSS-829] Add codegen testing and replace linters Oct 28, 2025
@the-chris-mitchell the-chris-mitchell merged commit 4c11308 into master Oct 28, 2025
6 checks passed
@the-chris-mitchell the-chris-mitchell deleted the PETOSS-829-add-GHA-healthcheck branch October 28, 2025 19:45
@github-actions
Copy link

🎉 This PR is included in version 9.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 9.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@xero-public-bot
Copy link

🎉 This PR is included in version 9.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants