-
Notifications
You must be signed in to change notification settings - Fork 583
ci: Auto-run CI on toxgen PRs #5472
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 |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ jobs: | |
| run: | | ||
| COMMIT_TITLE="ci: 🤖 Update test matrix with new releases" | ||
| DATE=`date +%m/%d` | ||
| BRANCH_NAME="toxgen/update" | ||
| BRANCH_NAME="toxgen/update-$(date +%m-%d)" | ||
|
|
||
| git checkout -B "$BRANCH_NAME" | ||
| git add --all | ||
|
|
@@ -109,3 +109,18 @@ jobs: | |
| issue_number: pr.number, | ||
| labels: ['Component: CI', 'Component: Tests'] | ||
| }); | ||
|
|
||
| // Close and reopen the PR to trigger CI | ||
| // (PRs created by GITHUB_TOKEN don't trigger workflows) | ||
| await github.rest.pulls.update({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: pr.number, | ||
| state: 'closed' | ||
| }); | ||
| await github.rest.pulls.update({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: pr.number, | ||
| state: 'open' | ||
| }); | ||
|
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. Close/reopen with GITHUB_TOKEN won't trigger CIHigh Severity The close/reopen workaround won't actually trigger CI workflows. GitHub prevents all events generated by |
||


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.
Date-based branch breaks old PR cleanup logic
Medium Severity
Changing
BRANCH_NAMEfrom a statictoxgen/updateto a date-basedtoxgen/update-$(date +%m-%d)breaks the existing PR cleanup logic. The cleanup query filters byhead: owner:branchName, so it only finds PRs matching the current week's branch name. PRs from previous weeks (e.g.,toxgen/update-02-12) will never matchtoxgen/update-02-19and will accumulate as unclosed open PRs.Additional Locations (1)
.github/workflows/update-tox.yml#L83-L84