Add a pull request to the MetaMask PR review queue project board. Use when the user asks to add a PR to the review queue, submit a PR for review tracking, or add to the MetaMask project board.
Add a pull request to the MetaMask PR review queue project board.
Priority options can change — always fetch them dynamically:
gh project field-list 64 --owner MetaMask --format json
From the JSON response:
"name": "Priority" → extract its id (the Priority field ID) and its array (each with and ).optionsidname"name": "Comment" → extract its id (the Comment field ID).Use the AskQuestion tool to present the Priority options and ask the user to pick one. Default to the option whose name contains "Priority 3" if the user does not specify.
gh project item-add 64 --owner MetaMask --url <PR-URL> --format json --jq '.id'
This returns the item node ID needed for field updates.
gh project view 64 --owner MetaMask --format json --jq '.id'
Use the Priority field ID and selected option ID obtained in step 1.
gh api graphql -f query='
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId,
itemId: $itemId,
fieldId: $fieldId,
value: { singleSelectOptionId: $optionId }
}) { projectV2Item { id } }
}
' -f projectId="<PROJECT_NODE_ID>" \
-f itemId="<ITEM_NODE_ID>" \
-f fieldId="<PRIORITY_FIELD_ID>" \
-f optionId="<SELECTED_OPTION_ID>"
Use the Comment field ID obtained in step 1.
Automatically compute today's date in short month + day format (e.g. "Feb 21", "Mar 4", "Jan 10") — do NOT ask the user for this value.
DATE_COMMENT=$(date +"%b %-d")
gh api graphql -f query='
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $comment: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId,
itemId: $itemId,
fieldId: $fieldId,
value: { text: $comment }
}) { projectV2Item { id } }
}
' -f projectId="<PROJECT_NODE_ID>" \
-f itemId="<ITEM_NODE_ID>" \
-f fieldId="<COMMENT_FIELD_ID>" \
-f comment="$DATE_COMMENT"
Confirm the PR was added to the review queue with: