devicon icon indicating copy to clipboard operation
devicon copied to clipboard

Run check bot on labeling PR with `bot:check`

Open Snailedlt opened this issue 3 years ago • 8 comments

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

Snailedlt avatar Oct 31 '22 16:10 Snailedlt

@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 😁

Snailedlt avatar Nov 19 '22 11:11 Snailedlt

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 avatar Nov 19 '22 12:11 lunatic-fox

@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:check it'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 :)

Snailedlt avatar Nov 19 '22 13:11 Snailedlt

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.yml workflow starts to run.
    • ✔ Then, post_check_icon_pr_comment.yml runs.
  • Add bot:check label

    • 🚫 peek_icons.yml workflow is skipped.
    • 🚫 Then, post_peek_screenshot.yml is 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 avatar Dec 12 '22 16:12 lunatic-fox

@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

Snailedlt avatar Feb 09 '23 08:02 Snailedlt

Ping.

Panquesito7 avatar Apr 26 '23 16:04 Panquesito7

@lunatic-fox You mentioned an easy fix here, but I'm not sure what you mean the issue is. Do you mind fixing it?

Snailedlt avatar Jun 02 '25 10:06 Snailedlt

or should I just merge it as-is?

Snailedlt avatar Jun 02 '25 10:06 Snailedlt

Has not been updated in a while, closing, but it can be reopened.

canaleal avatar Nov 15 '25 04:11 canaleal