Skip to content

ci: delete pre-releases matching existing or escaped tags#40

Merged
zimeg merged 18 commits intoslackapi:mainfrom
zimeg:ci-delete-fork-prereleases
Apr 17, 2025
Merged

ci: delete pre-releases matching existing or escaped tags#40
zimeg merged 18 commits intoslackapi:mainfrom
zimeg:ci-delete-fork-prereleases

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Apr 15, 2025

Summary

This PR deletes prereleases created from forked pull requests after the branch is deleted.

Preview

Two separate but related issues of lingering prereleases are fixed here:

Dashes to slashes

Identified pre-release tagname to 🔪: v3.0.4-dependabot/github_actions/codecov/codecov-action-5.4.2

Forked tag prefixes

Identified pre-release tagname to 🔪: v3.0.4-v3.0.4-pull/35/head

Requirements

@zimeg zimeg added semver:patch Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels Apr 15, 2025
@zimeg zimeg added this to the Next Release milestone Apr 15, 2025
@zimeg zimeg self-assigned this Apr 15, 2025
@zimeg zimeg requested a review from a team as a code owner April 15, 2025 18:02
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.93%. Comparing base (fdab4c7) to head (6770a05).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   62.91%   62.93%   +0.02%     
==========================================
  Files         210      210              
  Lines       22149    22149              
==========================================
+ Hits        13934    13940       +6     
+ Misses       7129     7125       -4     
+ Partials     1086     1084       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks mwbrooks changed the title ci: delete prereleases created from forked pull requests ci: delete pre-releases created from forked pull requests Apr 15, 2025
Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM! Thanks for continuing to tighten up our external contributor process! ✨

@zimeg zimeg changed the title ci: delete pre-releases created from forked pull requests ci: delete pre-releases matching existing or escaped tags Apr 17, 2025
@zimeg
Copy link
Member Author

zimeg commented Apr 17, 2025

@mwbrooks Thanks so much too for the review 🙏 ✨

I was exploring a lot of unrelated changes in this PR that branched into #42 and #44. These both attempt to address the E2E tests not running for this PR, but AFACT that is instead related to changes of the .github/workflows files 🤖

For now I'm wanting to merge this change to test the actual deletion of this branch. I'll report back with findings, and if all goes well I'll cleanup a few releases made from previous tests.

@zimeg zimeg merged commit b939841 into slackapi:main Apr 17, 2025
5 checks passed
@zimeg zimeg deleted the ci-delete-fork-prereleases branch April 17, 2025 22:11
@zimeg
Copy link
Member Author

zimeg commented Apr 17, 2025

📣 So close. The branch deletion event starts workflows on the fork. This makes sense but also might require a follow up PR.

I'll check one more thing before that. Deleting a release or existing tag might start the workflow on this upstream. I'll check both, but follow up still seems needed in either case 👀

@zimeg
Copy link
Member Author

zimeg commented Apr 17, 2025

📝 This workflow starts if a tag is deleted. Not releases:

I think the gh command cleans up tags when deleting releases which is how we avoid failed runs most often. For now this seems alright though 🔍

@zimeg
Copy link
Member Author

zimeg commented Apr 17, 2025

📝 We are also escaping the branch name of a pull request as expected here! I'm thinking another event might let us used the status of a closed PR to run this workflow when merging forked PRs:

Did not find v3.0.4-pull-38-head tag, trying version prefixes...

https://github.com/slackapi/slack-cli/actions/runs/14525840455/job/40757068833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build M-T: Changes to compilation and CI processes semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants