Closed ZhongRuoyu closed 10 hours ago
Sorry, have been a little bit busy this week. I'll get back to this soon.
I think it might be nice to make this a little higher level such that it will also autoclose an issue on success and open a new issue on failure. Maybe even post more comments on repeated failures? Thoughts?
How about this: we turn this into an action that's able to perform the following depending on ${{ steps.some-previous-step.conclusion }}
:
failure
: looks for an issue with the same title, and posts a new comment under it if found, or opens a new one otherwise.success
: closes the existing issue with the same title, if any.With usage like:
- uses: Homebrew/actions/create-issue@master
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
update-existing: true
close-existing: true
dependent-step-conclusion: ${{ steps.deploy.conclusion }}
title: Deployment failed
body: Issue body (or comment to post if issue already exists)
labels: label1,label2
assignees: user1,user2
@ZhongRuoyu This seems great!
Sure! I'll first do formulae.brew.sh as that's run most frequently. If that works well I'll roll this out to more places.
Related: https://github.com/Homebrew/homebrew-core/pull/190657#issuecomment-2353378549