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 on deployment failure #241

Closed
wants to merge 10 commits into from

Conversation

jbrown-xentity
Copy link
Contributor

@jbrown-xentity jbrown-xentity commented Feb 12, 2021

Working Example. Uses the github-script action. Related to GSA/data.gov#2603.

This step should be attachable to any github actions job, and should work (inside the GSA org; need a special permission token to create issues and comment on them; see here for more details).

Would like to harden this before deploying, because if this code is going to be copied and utilized in different repositories for action workflows we do not want to be updating it in 10 different repo's...

Anyone that has a workflow that fails gets an email (I got many while testing this code), so even if this task fails an email will go out to the specific user who merged the commit to main/develop.

Things to consider:

  • Can we re-use a task, so we only define this once per action (could not find any documentation one way or another)?
  • Should we use Object.assign or the Spread Operator?
  • Should we use any try-catch blocks?

@jbrown-xentity jbrown-xentity requested a review from a team February 12, 2021 05:58
@jbrown-xentity jbrown-xentity changed the title Create job on deployment failure Create issue on deployment failure Feb 12, 2021
adborden
adborden previously approved these changes Feb 16, 2021
Copy link
Contributor

@adborden adborden 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! This is too much code to copy/paste so we're going to want to move this to a proper action.

.github/workflows/commit.yml Outdated Show resolved Hide resolved
.github/workflows/commit.yml Outdated Show resolved Hide resolved
@jbrown-xentity
Copy link
Contributor Author

Looks good! This is too much code to copy/paste so we're going to want to move this to a proper action.

I see the github-script library lets you run a file... Do we want to write a script and attach to each repo? Do we want to make a new repo and pull that into the action? Or do we need to make a full action with variable input and publish it to the marketplace?

@adborden
Copy link
Contributor

I see the github-script library lets you run a file... Do we want to write a script and attach to each repo? Do we want to make a new repo and pull that into the action? Or do we need to make a full action with variable input and publish it to the marketplace?

It should be a full action with variable input and published to the marketplace.

@jbrown-xentity
Copy link
Contributor Author

Closing in place of writing a ticket... GSA/data.gov#2827

@nickumia-reisys nickumia-reisys deleted the feature/deploy-issue-create branch October 18, 2022 21:18
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.

2 participants