Skip to content

Commit

Permalink
fix(action): bug report creation was not working (#7371)
Browse files Browse the repository at this point in the history
## **Description**
The last step of the create-release-pr.yml workflow creates a release
branch, which shall itself trigger another workflow:
create-bug-report.yml. However, there is a security feature in Github
that prevents workflows from triggering other workflows by default. The
workaround is to use a personal access token (BUG_REPORT_TOKEN) instead
of the default GITHUB_TOKEN for the checkout action.

## **Manual testing steps**

Available in original PR:
#6967

## **Screenshots/Recordings**

Available in original PR:
#6967

### **Before**

_[screenshot]_

### **After**

_[screenshot]_

## **Related issues**

Fixes MetaMask/mobile-planning#1184

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
gauthierpetetin authored Oct 2, 2023
1 parent 46b493b commit 30e2693
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
# We check out the specified branch, which will be used as the base
# branch for all git operations and the release PR.
ref: ${{ github.event.inputs.base-branch }}
# The last step of this workflow creates a release branch, which shall itself
# trigger another workflow: 'create-bug-report.yml'. However, there is a security
# feature in Github that prevents workflows from triggering other workflows by default.
# The workaround is to use a personal access token (BUG_REPORT_TOKEN) instead of
# the default GITHUB_TOKEN for the checkout action.
token: ${{ secrets.BUG_REPORT_TOKEN }}
- name: Get Node.js version
id: nvm
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 30e2693

Please sign in to comment.