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

feat: github actions to automatically create and close bug report issue #6967

Merged
merged 8 commits into from
Aug 17, 2023

Conversation

gauthierpetetin
Copy link
Contributor

@gauthierpetetin gauthierpetetin commented Aug 3, 2023

Description

The purpose of these new Github actions is to automatically:

  • create a bug report issue when a new release is cut, i.e. the upon the creation of release branch release/x.y.z.
  • close the bug report issue when the release branch release/x.y.z gets merged

Screenshots/Recordings

Recording for bug report issue creation: https://recordit.co/zcmmMXjJPC
Recording for bug report issue closed: https://recordit.co/lkKNtcmXgb

Issue

Progresses https://github.com/MetaMask/mobile-planning/issues/1184

Manual Testing Steps

  • Create a public test Github repo
  • Add these Github actions to the test repo
  • Create a personal access token with "repo" permissions
  • In your test repo's settings, add the personal access token as BUG_REPORT_TOKEN in section "Secrets and variables">"Actions">"Secrets">"New repository secret".
  • In your test repo, create a new branch with the following format: release/x.y.z
  • This shall create a new bug report issue in the MM planning repo, called "vx.y.z Bug Report"
  • In your test repo, merge the release/x.y.z branch into master
  • This shall close the bug report issue called "vx.y.z Bug Report" in the MM planning repo

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Other

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 3, 2023
@gauthierpetetin gauthierpetetin changed the title feat: github action to automatically create and close bug report issue feat: github actions to automatically create and close bug report issue Aug 3, 2023
chrisleewilcox
chrisleewilcox previously approved these changes Aug 14, 2023
Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

@Cal-L
Copy link
Contributor

Cal-L commented Aug 14, 2023

Looks like there's a workflow check that's failing and complaining about how branches is not a valid filter for the create event? Here's a post about it - https://github.com/orgs/community/discussions/26286. Were you experiencing any unwanted effects when you were testing? @gauthierpetetin

@gauthierpetetin
Copy link
Contributor Author

Thanks @chrisleewilcox and @Cal-L for the reviews.
Great catch, indeed Github actions don't yet support branch filters, which means the action was being executed for any kind of branches, even if not named release/x.y.z.
I pushed a fix in this commit.

@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@gauthierpetetin gauthierpetetin merged commit 3112d75 into main Aug 17, 2023
11 checks passed
@gauthierpetetin gauthierpetetin deleted the feat/bug-report-issue branch August 17, 2023 20:57
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 17, 2023
@metamaskbot metamaskbot added the release-7.6.0 Issue or pull request that will be included in release 7.6.0 label Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.6.0 Issue or pull request that will be included in release 7.6.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants