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
…27821)

* chore: update chrome PR creation workflow to add to firewatch board

* chore: adding in ability to manually run job

* chore: changing how we add the chrome update PR to the firewatch board
  • Loading branch information
Ben M authored Sep 15, 2023
1 parent 0e239bf commit 849da7c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Update Browser Versions
on:
workflow_dispatch:

schedule:
- cron: '0 8 * * *' # every day at 8am UTC (3/4am EST/EDT)
jobs:
Expand Down Expand Up @@ -104,6 +106,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 @@ -117,4 +120,5 @@ jobs:
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',
addToProjectBoard: true,
})
26 changes: 25 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, baseBranch, branchName, description, body, reviewers, addToProjectBoard }) => {
const { data: { number } } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -17,6 +17,30 @@ const createPullRequest = async ({ context, github, baseBranch, branchName, desc
reviewers,
})
}

if (addToProjectBoard) {
const addToProjectBoardQuery = `
mutation ($project_id: ID!, $item_id: ID!) {
addProjectV2ItemById(input: {contentId: $item_id, projectId: $project_id}) {
clientMutationId
item {
id
}
}
}`

const addToProjectBoardQueryVars = {
project_id: 9,
item_id: number,
}

const addToProjectBoard = await github.graphql(
addToProjectBoardQuery,
addToProjectBoardQueryVars
)

}

}

module.exports = {
Expand Down

2 comments on commit 849da7c

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 849da7c Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/darwin-arm64/develop-849da7c6f5c5a738708f2855a1bd615fdf873756/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 849da7c Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/darwin-x64/develop-849da7c6f5c5a738708f2855a1bd615fdf873756/cypress.tgz

Please sign in to comment.