Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-issue: add action #588

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

create-issue: add action #588

wants to merge 2 commits into from

Conversation

ZhongRuoyu
Copy link
Member

SMillerDev
SMillerDev previously approved these changes Sep 18, 2024
create-issue/action.yml Outdated Show resolved Hide resolved
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 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?

required: false
default: ${{ github.token }}
repository:
description: Repository to send the issue to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Repository to send the issue to
description: Repository to create the issue in

@ZhongRuoyu
Copy link
Member Author

ZhongRuoyu commented Sep 19, 2024

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 post a new comment under it if found, or open a new one otherwise.
  • success: closes an issue if there exists one with the title.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants