Skip to content

Commit

Permalink
chore: update chrome PR creation workflow to add to firewatch board
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben M committed Sep 15, 2023
1 parent 0e239bf commit 45a9915
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
})
# Update available and a PR doesn't already exist
- name: Create Pull Request
id: create-pr
if: ${{ steps.check-need-for-pr.outputs.needs_pr == 'true' }}
uses: actions/github-script@v6
with:
Expand All @@ -113,8 +114,25 @@ jobs:
await createPullRequest({
context,
github,
core,
baseBranch: '${{ env.BASE_BRANCH }}',
branchName: '${{ steps.check-branch.outputs.branch_name }}',
description: '${{ steps.get-versions.outputs.description }}',
body: 'This PR was auto-generated to update the version(s) of Chrome for driver tests',
})
#add to firweatch board for visibility
- name: add to firewatch board
env:
GITHUB_TOKEN: ${{ secrets.TRIAGE_BOARD_TOKEN }}
ISSUE_ID: ${{ steps.create-pr.outputs.pr }}
PROJECT_ID: 9
run: |
gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID
5 changes: 4 additions & 1 deletion scripts/github-actions/create-pull-request.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const createPullRequest = async ({ context, github, baseBranch, branchName, description, body, reviewers }) => {
const createPullRequest = async ({ context, github, core, baseBranch, branchName, description, body, reviewers }) => {
const { data: { number } } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -17,6 +17,9 @@ const createPullRequest = async ({ context, github, baseBranch, branchName, desc
reviewers,
})
}

core.setOutput('pr', number)

}

module.exports = {
Expand Down

0 comments on commit 45a9915

Please sign in to comment.