Homebrew / actions

🚀 Homebrew's GitHub Actions
BSD 2-Clause "Simplified" License
118 stars 39 forks source link

create-or-update-issue: add action #588

Closed ZhongRuoyu closed 10 hours ago

ZhongRuoyu commented 5 days ago

Related: https://github.com/Homebrew/homebrew-core/pull/190657#issuecomment-2353378549

ZhongRuoyu commented 4 days 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 }}:

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
MikeMcQuaid commented 3 days ago

@ZhongRuoyu This seems great!

ZhongRuoyu commented 10 hours ago

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.