ci: delete testing fork pre-releases in the upstream context#49
Conversation
zimeg
left a comment
There was a problem hiding this comment.
📝 A note on the change for reviewers around!
| # This workflow action deletes that pre-release when a PR is merged or closed. | ||
| on: | ||
| pull_request: | ||
| pull_request_target: |
There was a problem hiding this comment.
AFAICT this is the "same" event as pull_request but runs in the base branch context. That makes testing it within a PR not so simple I find 🤔
There was a problem hiding this comment.
Wow, good find!
suggestion: Always a good idea to leave a comment above around why we've using pull_request_target: otherwise a future maintainer may come in and change this back to pull_request:
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
=======================================
Coverage 62.91% 62.92%
=======================================
Files 210 210
Lines 22147 22147
=======================================
+ Hits 13933 13935 +2
+ Misses 7128 7126 -2
Partials 1086 1086 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
✅ LGTM! Left a minor suggestion but non-blocking to merge this PR when you're ready! It's exciting to see all of the pieces come together for fork support!
| # This workflow action deletes that pre-release when a PR is merged or closed. | ||
| on: | ||
| pull_request: | ||
| pull_request_target: |
There was a problem hiding this comment.
Wow, good find!
suggestion: Always a good idea to leave a comment above around why we've using pull_request_target: otherwise a future maintainer may come in and change this back to pull_request:
|
@mwbrooks @hello-ashleyintech Thank y'all both for the reviews 🤠
And also appreciate this callout! I added more to a comment in 598e01e on how branches are expected to be deleted for future inspection. I'm also hopeful that this will be a final piece in the testing of PRs from forks for this time. Let's soon find out! |
|
📣 For this PR, created on an upstream branch, we find releases removed: |
|
📣 For another PR, created on a fork, these releases are also deleted! https://github.com/slackapi/slack-cli/actions/runs/14539532571/job/40794613787 |
|
🫡 Removing pre-releases used for past testing that've since been merged: |
Summary
This PR replaces the
pull_requestevent withpull_request_targetto delete pre-releases in the context of this upstream base branch.Fixes an issue where deleting or closing forked PRs errored with an unauthorized token.
Requirements