Allow workflow to pass from forked repo PR#87
Conversation
✅ Deploy Preview for biongff-vizarr ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR aims to make the CI “Build & Test” workflow succeed for pull requests opened from forked repositories by removing the need for an elevated-permissions checkout token, and by adjusting Biome linting exclusions to avoid conflicts around package.json.
Changes:
- Removed use of
secrets.GH_PATforactions/checkoutin the test workflow. - Updated Biome configuration to ignore selected
package.jsonfiles during linting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
biome.json |
Expands Biome ignore list to exclude some package.json files from linting. |
.github/workflows/test.yml |
Removes elevated-permissions checkout token to better support forked PR runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
This catch by co-pilot seems valid. The workflow will still fail because CODECOV_TOKEN is present. The suggestion of making this conditional is good, as it will then upload code coverage reports for main and local branches, but not for remote repos.
davehorsfall
left a comment
There was a problem hiding this comment.
A couple of good comments from co-pilot. However, this might take some trial and ever. Please address comments by co-pilot and merge when you're happy, and see if it helps with the open PRs. Thanks.
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
This catch by co-pilot seems valid. The workflow will still fail because CODECOV_TOKEN is present. The suggestion of making this conditional is good, as it will then upload code coverage reports for main and local branches, but not for remote repos.
It doesn't, the codecov action implements a workaround (I verified this works by implementing the same changes via a forked repo) However, I can stop the upload for remote repos anyway if that's desirable. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
Removes requirement for elevated-permissions access token in test workflow to allow forked PR workflows to pass.
Ignore package.jsons for linting because automated linting is applied by pnpm which clashes with biome causing the workflow to fail.