-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ci: Github action to check issue body matches issues templates and add labels to issue when needed #7379
Conversation
…tected with a label The new bug report template makes it mandatory to indicate what release version the bug was detected in. We want to exploit that information by extracting the version number from issue body and indicate it by adding corresponding regression prod label on the issue. In addition to it, we also want to add a label to indicate when the bug has been reported by someone external to the MetaMask organisation. We will be able to leverage these two new labels to improve our bug triage process and our metrics collection.
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. |
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7379 +/- ##
=======================================
Coverage 34.60% 34.60%
=======================================
Files 1019 1019
Lines 27192 27192
Branches 2212 2212
=======================================
Hits 9409 9409
Misses 17295 17295
Partials 488 488 ☔ View full report in Codecov by Sentry. |
…s to achieve The github action was initially only meant to add regression-prod labels while the scope is nox extended, which is why it's worth renaming a few things to reflect it.
Would it be possible for the issue template to indicate the required sections as HTML comments? I usually delete the screenshots sections when the code is not related to the UI, eg: <!-- Required, don't delete -->
### Screenshots
|
@gauthierpetetin on Pedro's note - Would it make sense to check post editing if required fields are still populated and apply the invalid label accordingly? For example, I can edit the issue and provide an empty string in the description section and it would still be considered valid. Or do you think that would be too much friction for contributors? |
@wachunei the majority of sections are optional in the new templates we introduced in September, and get automatically filled with
@Cal-L the Github action is triggered every time, issue gets created or updated (cf. here) and labels are updated accordingly. Does that correspond to what you suggest? |
What I meant was if you delete the body of the description post issue creation, it doesn't see it as invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
…iles Nicholas Ellul raised that the script would not be able to retrieve list of organisations for users who have their GitHub set to private mode. As a consequence, these users would appear as external contributors while they are not. This commit introduces a different way to check if users belong to the MetaMask organisation, which allows to support even users with private profiles.
I just pushed one last fix to address @NicholasEllul 's comment made here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Kudos, SonarCloud Quality Gate passed! |
Description
This PR introduces a new Github action, to achieve the following:
INVALID-ISSUE-TEMPLATE
label in case issue doesn't match any of the templatesexternal-contributor
label in case issue was created by someone external to the MetaMask organisationregression-prod-x.y.z
label when possible, whenx.y.z
value can be extracted from 'bug-report.yml' templateWe will be able to leverage
regression-prod-x.y.z
andexternal-contributor
labels to improve our bug triage process and our metrics collection.Same PR for Extension repo
Manual testing steps
regression-prod-x.y.z
andexternal-contributor
)regression-prod-x.y.z
shall be updated accordinglyINVALID-ISSUE-TEMPLATE
shall be addedScreenshots/Recordings
Before
NA
After
https://recordit.co/Sq7fvCwkr5
Related issues
Fixes https://github.com/MetaMask/mobile-planning/issues/1293
Pre-merge author checklist
Pre-merge reviewer checklist