-
Notifications
You must be signed in to change notification settings - Fork 131
ci: add aireceipts pr-check (notice-only cost receipt) #992
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name: aireceipts | ||
| on: [pull_request] | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| jobs: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [SUGGESTION]: Add a This workflow runs on every concurrency:
group: aireceipts-${{ github.head_ref || github.run_id }}
cancel-in-progress: trueReply with |
||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: npx -y aireceipts-cli@latest pr-check | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This job runs Useful? React with 👍 / 👎. |
||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For pull requests from forks or Dependabot, this
pull_requesttrigger downgradesGITHUB_TOKENwrite scopes to read-only even though the workflow asks forpull-requests: write(GitHub's workflow syntax docs state that forked PR write permissions are changed to read unless the repository explicitly sends write tokens). In that context, a branch that carries an aireceipts receipt ref still cannot have the receipt posted back to the PR, so the new check silently misses the external-contributor cases it is meant to annotate; use a safepull_request_target/separate trusted posting path or explicitly gate/skip those events.Useful? React with 👍 / 👎.