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

Possible to use autolabeler without creating a draft release on unmerged PR? #977

Closed
ahatzz11 opened this issue Nov 19, 2021 · 2 comments
Closed

Comments

@ahatzz11
Copy link

Currently when a PR is opened it autolabels, but it also adds that unmerged PR to the release draft. I would like to autolabel my PRs, but I only want merged PRs to be added to my draft. Is this possible?

@ahatzz11 ahatzz11 changed the title Possible to use autolabeler without creating a draft release? Possible to use autolabeler without creating a draft release on unmerged PR? Nov 19, 2021
@harrylewis
Copy link

Hey @ahatzz11 👋

I was also just experiencing this issue as well today, and came across #917. It explains about an undocumented workflow configuration, disable-releaser, which can be used.

This PR, sbgisen/.github#26, contains a good example of how this could be used for your scenario.

@ahatzz11
Copy link
Author

ahatzz11 commented Nov 19, 2021

@harrylewis thanks for the info! This completely stopped release-drafter from running, which means that the autolabeler also didn't run.

Am I able to have the auto-labeler part run without generating a release? Also I think using disable-releaser is kind of a roundabout way of fixing that when you could just turn off the pull_request events if it just 100% disables it.

It turns out the quick test I did I forgot to put something in the title that matched my autolabeler, so it did run but didn't find anything 🤦

For anyone maybe running into this, the above code worked great!

with:
  # allows autolabeler to run without unmerged PRs from being added to draft
  disable-releaser: ${{ github.ref_name != github.event.repository.default_branch }}

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

No branches or pull requests

2 participants