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

chore(ci): Switch out labeler action, define labels in workflow inline instead of by config file #31758

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Jan 17, 2024

Description

Use labeler action that accepts pull_request_target GH events instead of https://github.com/cbrgm/pr-size-labeler-action.

Motivation

The pr-size-labeler-action action is really nice, but has hardcoded GITHUB_EVENT_NAME consts in the Go code, see isValidEvent function.

PRs from forks (99% of those landing here) are therefore ignored, so switching out to one with less features, but works as expected.

Related issues and pull requests

@bsmth bsmth requested a review from a team as a code owner January 17, 2024 10:42
@bsmth bsmth requested a review from LeoMcA January 17, 2024 10:42
@github-actions github-actions bot added the system [PR only] Infrastructure and configuration for the project label Jan 17, 2024
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

lgtm! 🤞

@bsmth
Copy link
Member Author

bsmth commented Jan 17, 2024

Thank you, merging shortly

@bsmth bsmth merged commit 50ba4dc into mdn:main Jan 17, 2024
7 of 8 checks passed
@bsmth bsmth deleted the ci-labeler-fix branch January 17, 2024 10:49
@cbrgm
Copy link

cbrgm commented Jan 17, 2024

Hi there @bsmth, I believe that replacing the hardcoded event type with a list of valid options or making the event type configurable is a worthwhile suggestion. It seems like this issue could be a significant blocker for many others as well. 😄

@cbrgm
Copy link

cbrgm commented Jan 17, 2024

Released in v1.1.10 / v1 . I'm sorry for troubles this might have caused. Despite switching to a different action, I appreciate your effort in trying out this one and helping to identify the issue @bsmth @LeoMcA . 😃

@bsmth
Copy link
Member Author

bsmth commented Jan 18, 2024

Hey there 👋🏻 nice to see you dropping in! After looking at quite a few actions, I think yours is looking great and I was reluctant to get rid of it, to be honest.

Released in v1.1.10 / v1 .

That was fast! Well done, I think that should cover the only viable event types that can be passed. I would really like to try this out again in future. We have a reusable workflows repo that might be a good place to add it.

I'm sorry for troubles this might have caused

Not at all, it gets a little noisy for people who are watching the repo in terms of notifications, but that's how it is sometimes with GH actions, it's tricky to test without pushing to main for some cases.

Feel free to drop into our Discord, we could have a chat about it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system [PR only] Infrastructure and configuration for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants