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

Adds workflow file to check for labels on PRs #11

Merged
merged 5 commits into from
Nov 30, 2024
Merged

Conversation

daslerr
Copy link

@daslerr daslerr commented Nov 30, 2024

What does this change?

This PR adds a file (check-pr-label.yml) that creates a workflow for checking for release category labels.

Common Theme?

This PR doesn't change Common itself, but it adds a workflow that blocks PRs to common-theme if they do have have one of the release category labels outlined in releases.yml

  • Yes

Issue number: #9

Checklist

Who needs to know about this?

@reshamas @SallyMcGrath @illicitonion

@daslerr daslerr requested a review from reshamas November 30, 2024 21:28
@daslerr daslerr added the Chore label Nov 30, 2024
@daslerr
Copy link
Author

daslerr commented Nov 30, 2024

Well, it blocked itself because it didn't have a label. So I guess it works.

@daslerr daslerr closed this Nov 30, 2024
@daslerr daslerr reopened this Nov 30, 2024
Adding a label doesn't by default trigger the workflow on a PR. I added explicit types for triggering for what I thought were the most likely cases.
@daslerr
Copy link
Author

daslerr commented Nov 30, 2024

After it blocked itself because it had no label, I labeled it and re-ran the check, but it still failed. So I had to close and reopen the PR to get it to pass. According to the GitHub docs on writing workflows, by default a workflow only runs when a PRs activity type is 'opened', 'reopened', or 'synchronize', so I added some activity types to the yml to cover labeling, unlabeling, and editing as well. There are many others I did not add.

@daslerr daslerr added the Semver-Minor Minor version label for release label Nov 30, 2024
@daslerr
Copy link
Author

daslerr commented Nov 30, 2024

And after I merged Reshama's PR #10 requiring semver labels, it triggered a check automatically on this PR that failed. When I added the semver label, the check triggered again and passed. So I think we did it. Hooray!

@reshamas reshamas removed the Chore label Nov 30, 2024
@reshamas reshamas added the Chore label Nov 30, 2024
@reshamas
Copy link

@daslerr It looks like it is working!

@reshamas reshamas merged commit d924e6b into main Nov 30, 2024
5 of 6 checks passed
@reshamas reshamas deleted the daslerr-patch-1 branch November 30, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore Semver-Minor Minor version label for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants