fix: skip schema-check and pr-title validation on release PRs#1272
Conversation
Add 'release' label to auto-created release PRs and use it to skip the schema-check job and PR title validation that incorrectly fail on release PRs.
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-1272-tarball/aws-agentcore-0.13.1.tgz |
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
The label-based approach is reasonable, but there's one blocker: the release label does not currently exist in this repository.
Running gh label list shows labels like pending release, bug, dependencies, ci, etc., but no release label. When the release workflow runs, gh pr create --label release will fail with something like could not add label: 'release' not found, which would break the entire release workflow this PR is trying to fix.
A few options to address this:
- Create the
releaselabel in the repo before merging (via the GitHub UI orgh label create release). Simple and keeps the workflow change minimal. - Create the label idempotently in the workflow before
gh pr create, e.g.:This makes the workflow self-contained.- name: Ensure release label exists env: GH_TOKEN: ${{ github.token }} run: gh label create release --color ededed --description "Auto-created release PR" --force
- Reuse the existing
pending releaselabel instead of introducing a new one. Update both thelint.ymlcontains(...)check andpr-title.yml'signoreLabelsto usepending release, and pass--label "pending release"inrelease.yml. (Note: that label seems to be used elsewhere with different semantics, so option 1 or 2 is probably cleaner.)
Option 1 or 2 is preferred.
|
I think it might create on first api call, but created release in advance to be safe. https://github.com/aws/agentcore-cli/issues/labels?q=state%3Aopen%20label%3Arelease |
|
e2e test failure from https://github.com/aws/aws-sdk-js-v3/issues, unrelated to PR. |
Description
Skip the
schema-checkjob and PR title validation on auto-created release PRs by using areleaselabel.--label releasetogh pr createpr-title.ymladdsreleasetoignoreLabelsso semantic title validation is skippedlint.ymladds anifcondition toschema-checkto skip when thereleaselabel is presentEx. #1271 has these checks failing, but its just noise since we don't care about these checks on release branches.
Related Issue
N/A — fixing CI failures on auto-created release PRs.
Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.