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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GitHub Actions to automatically label Pull Requests #2420
Use GitHub Actions to automatically label Pull Requests #2420
Conversation
I'm using my personal fork of https://github.com/actions/labeler because I could not any labeling action that checked whether a file was added or changed (or removed).
That's cool! Had that on my bucket list as well :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since nobody complains we can merge this nice thing in 馃槑
Thanks @ericcornelissen!
Uuuh, .... somethings wrong, @ericcornelissen 馃槰 |
I had noticed this already, seems to be the problem discussed in actions/labeler#12 馃槥 I'm trying to find a solution, if I can't find anything I will Revert this Pull Request... Anyway, for now you can merge a Pull Request where this error occurs if you want. It's not pretty but it's fine 馃憤 |
Ach, what a shame. |
I will be reverting this PR as I can't find a solution at the moment nor think of a suitable solution. I might try to convert my solution into a Probot or we can use this bot if it can suite our needs.
That would be nice nonetheless 馃檪 though I suspect our use case is quite niche |
This reverts commit f357ac7.
Issue: None
Checklist
n/a
Description
We got access to GitHub Actions a while back when it was still beta-access only but unfortunately haven't used it yet (we initially wanted to use it for #982) and I want to start using it to implement some stuff, among others #2380 and simple-icons/simple-icons-font#1. However, I decided to start with something that is a bit simpler, namely:
Feature: Adding the labels
new icon
andupdated icon
to Pull Requests automatically based on the files added or changed in the Pull Request.1For those unfamiliar with GitHub Actions the file
.github/workflows/pull_requests.yml
defines a "workflow", which is analogous to a build defined in.travis.yml
. In it I say thaton: [pull_requests]
I want to do some stuff, run one or more "actions", namely I want torun(s-)on: ubuntu-latest
a step as defined byericcornelissen/labeler@master
. In the case of the "action" is configured by.github/labeler.yml
(which is a hard requirement from the "action" itself). The (currently incomplete) documentation for the configuration can be found in the project's README.I tested the workflow in my fork of this repository, you can see the final results in this Pull Request and this Pull Request (and a bunch more attempts in the list of closed Pull Requests).
Also, the action should run on this Pull Request, but it does nothing as the files changed don't match the globs in the configuration.Based on this article it looks like the actions won't start running until this is merged because this PR is coming from a fork (rather than this repo) so I hope it will start working 馃Why do this with GitHub Action rather than Travis CI? To try it out and learn, but also because I think it is easier to use and work with especially when you want to do stuff like in #2380. We don't need to move our Travis CI builds to GitHub Actions, but we could do that as well. Also, I like it very much that all the configuration is in the
.github/
directory 馃檭PS. I'm using my personal fork of actions/labeler (namely ericcornelissen/labeler) because I could not any labeling action that checked whether a file was added or changed (or removed for that matter). I do have an open issue regarding this feature to see if there is more interest, if so it may get merged and then we can update this action accordingly.
1: I would personally have preferred if multiple PR templates was a thing, just like multiple Issue templates are...