Run check bot on labeling PR with `bot:check`
Double check these details before you open a PR
- [x] PR does not match another non-stale PR currently opened
Features
This PR closes NONE
Didn't create an issue for this since it was quicker to just implement it
Notes
You can now run the check-bot by adding the bot:check label to a PR. This is powerful, since it lets us get new PR info (like the title) as input to check-bot without creating a new PR. So instead of creating a new PR everytime we fix something, we can instead re-add the bot:check label to re-run it with new parameters :)
PS: https://github.com/devicons/devicon/wiki/Our-automated-tasks-and-bots#check-bot needs to be updated with info on how to run the check bot after this PR is merged into master
@lunatic-fox this is actually a PR I forgot to edit 😅
I wanna change it to a different label, since we use this label to label any icon PR, so the workflow would run twice on each PR. Instead I wanna use a new label (maybe bot:check?) to run the workflow. That way we can more easily choose when to run the PR without having to remove the feature:icon label 😁
Hmm... I think the workflow needs to trigger in two events:
- When the pull request is made.
- When a label is created.
Then if the "created" label is, for instance, bot:check it'll run the proper steps. Otherwise it should skip the job.
@lunatic-fox I changed the label... ready for review again now :)
Hmm... I think the workflow needs to trigger in two events:
- When the pull request is made.
- When a label is created.
Then if the "created" label is, for instance,
bot:checkit'll run the proper steps. Otherwise it should skip the job.
It already automatically runs on new PR's, provided that the PR title starts with new icon or update icon, so this PR only adds the additional trigger when the bot:check label is added to the PR :)
I tested it in a private repo, simulating the #1558 PR with the proper label bot:check. However, it seems that there is some kind of priority in "Peek Icons" workflow.
What happens
-
Made a new icon PR
- ✔
check_icon_pr.ymlworkflow starts to run. - ✔ Then,
post_check_icon_pr_comment.ymlruns.
- ✔
-
Add
bot:checklabel- 🚫
peek_icons.ymlworkflow is skipped. - 🚫 Then,
post_peek_screenshot.ymlis skipped.
- 🚫
My guess is since "Peek Icons" is more specific, because it's label triggered, runs first than "Check Icon PR", locking the target workflow. I think it's easy to fix it. 🙂
@lunatic-fox I didn't understand that explanation fully, but if it's an easy fix, feel free to fix it. If you want me to fix it I'm afraid I'll need to be spoon fed the explanation again :S
Ping.
@lunatic-fox You mentioned an easy fix here, but I'm not sure what you mean the issue is. Do you mind fixing it?
or should I just merge it as-is?
Has not been updated in a while, closing, but it can be reopened.