You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
[](https://codespaces.new/MetaMask/metamask-extension/pull/28799?quickstart=1)
This PR integrates the new reusable workflow
(MetaMask/github-tools#31) that can be used to
write data to google sheets when the merge group event fails.
Environment variables (= GitHub secrets) are required to configure:
- GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_SERVICE_ACCOUNT: The google
service account that is used for authentication with the google sheets
api.
- The service account needs to have access to the google sheet you
intend to operate on. To give access to the google sheet, you need to
click the "Share" button in the top-right corner. Enter the service
account's email (can be found on google cloud console), give "Editor"
permissions. After this, the service account will have access to this
spreadsheet, allowing read and write operations.
- SPREADSHEET_ID: unique identifier that can be found in the url when
you open the google sheet
- SHEET_NAME: name of a sheet in a spreadsheet that can be found on the
bottom
Short summary of what happens in the workflow:
1. Google api authentication setup
2. Check if current date exists in the spreadsheet
3. If current date exists, increment number of PRs by 1
4. If current date does not exist, create a new row with the current
date, and the number 1 (so that it can be incremented later, if more
merge group events fail on the same day).
Spreadsheet here:
https://docs.google.com/spreadsheets/d/11niHgT_E2YzzXHXQSxX5LNdA6i0GG5aa-OZWvn7_-o4
Dashboard here:
https://lookerstudio.google.com/u/1/reporting/e7e8f90e-72aa-4128-ae01-6305bf3393f4/page/p_pz1dszarmd
## **Related issues**
Fixes: MetaMask/MetaMask-planning#3400
## **Manual testing steps**
1. When the workflow runs, depending on the state of the spreadsheet:
- If the current date already exists, the number of PRs removed from the
merge queue should be incremented by 1.
- If the current date does not exist, a new row should be added with the
current date, and the number of PRs should be set to 1.
I created a private repository to test it, and there it worked. The
actual production usage can only be tested if we merge and see if
anything gets removed from the merge queue, in this case the spreadsheet
should get updated.
## **Screenshots/Recordings**
Not applicable
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
0 commit comments