Skip to content
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

feat: Avoid refixing successful template-oss PRs #146

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

hashtagchris
Copy link
Contributor

@hashtagchris hashtagchris commented Aug 27, 2024

template-oss-fix previously returned open template-oss PRs regardless of status. If you continued it would force push to green PRs, leading to unnecessary churn and possibly resetting approvals.

I opted to make the new option an exclusion list because commits can have a status of null, in the case of merge conflicts or the "Post Dependabot" commit not triggering a new CI run. "null" is used to indicate the option should be empty.

Before

% npx -p @npmcli/stafftools@latest gh template-oss-fix --author null
Running worker "template-oss-fix" which will "Fix failing template-oss pull requests" on the following items:
✅  npm/abbrev-js                 chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/eslint-config             chore: bump @npmcli/template-oss from 4.23.2 to 4.23.3
✅  npm/hosted-git-info           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/hosted-git-info           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
✅  npm/ignore-walk               chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
✅  npm/ini                       chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/map-workspaces            chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/minify-registry-metadata  chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/minipass-fetch            chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/npm-package-arg           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/npm-packlist              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-pick-manifest         chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/query                     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/ssri                      chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/stafftools                chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/types                     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
🔄  npm/unique-slug               chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3

Press any key to continue or CTRL+C to exit

After

% ./bin/gh.mjs template-oss-fix --author null
Running worker "template-oss-fix" which will "Fix failing template-oss pull requests" on the following items:
?   npm/cmd-shim           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/hosted-git-info    chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/map-workspaces     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/minipass-fetch     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-packlist       chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-pick-manifest  chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/query              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
?   npm/types              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3

Press any key to continue or CTRL+C to exit

References

Spotted while working on merging PRs ahead of npm/cli#7754

@hashtagchris hashtagchris requested a review from a team as a code owner August 27, 2024 20:13
Co-authored-by: Gar <wraithgar@github.com>
@hashtagchris hashtagchris merged commit df7a431 into main Aug 27, 2024
11 checks passed
@hashtagchris hashtagchris deleted the hashtagchris-filter-on-status branch August 27, 2024 20:30
@github-actions github-actions bot mentioned this pull request Aug 27, 2024
hashtagchris pushed a commit that referenced this pull request Aug 27, 2024
🤖 I have created a release *beep* *boop*
---


## [3.1.0](v3.0.0...v3.1.0)
(2024-08-27)

### Features

*
[`df7a431`](df7a431)
[#146](#146) Avoid refixing
successful template-oss PRs (#146) (@hashtagchris, @wraithgar)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants