Repository navigation
POC: Actions to comment on draft PR - #10733
Conversation
mhvk
left a comment
There was a problem hiding this comment.
That looks nice! I think having a message also for the case when someone turns a regular PR into a draft PR is useful (though would be nice if it happened only once).
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 'Comment Draft PR' | ||
| uses: actions/github-script@v3 |
There was a problem hiding this comment.
Maybe add a comment where the script comes from?
There was a problem hiding this comment.
It is from https://github.com/actions/github-script
There was a problem hiding this comment.
Thanks for the feedback! I'll refrain from making this too fancy, though, until we have a buy-in. I just want to show that it is possible right now. For a more complicated workflow, like checking if the bot has commented before, I'll have to investigate more and maybe writing a script to go with this action.
There was a problem hiding this comment.
It certainly gives a sense of what's possible; agreed that we should first discuss what to do, since ideally we do not have two different systems.
bsipocz
left a comment
There was a problem hiding this comment.
Looks good, and does the job.
|
As @astrofrog requested, I also updated my original post above to include a route for "Alternative using astropy-bot". |
5e5d023 to
28bd1f7
Compare
|
A lot has happened since this was opened, so I removed the standalone YAML and put labeler and this new Action in the same YAML instead. I also cancelled the CI. |
MNT: Add action to comment on draft PR.
28bd1f7 to
932b78d
Compare
|
If there are no objections, I would like to get this in and see how things go. We can think about how to handle the use case when someone opens a non-draft PR but then turn it into draft in a future PR, if there is enough demand. |
|
Thanks for the reviews! Merging. |
Description
This pull request implements our first GitHub Action! It leaves a friendly comment when a Draft PR is opened. The comment reminds PR author that they can skip CI if it is not ready. This is based on a discussion that happened, starting around #10729 (comment) .
Examples of this same Action, uh, in action:
p.s. A draft PR about a draft PR. Much Actions, so meta!
Alternative using astropy-bot
baldrickneeds to be re-deployed by Tom R or Stuart M (unless deploy is automatic somehow?).astropy-botneeds to be re-deployed by Tom R (unless deploy is automatic somehow?).experimentalbranch first and hook it up to a test repo.