Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/lib/gitUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ export async function createGitHubRelease({ version, body }: GitHubReleaseParams
})
}

export function createPullRequest(mainBranch: string) {
export function createPullRequest(mainBranch: string, labels?: string[]) {
using token = getGithubPullRequestToken()
command`gh auth login --with-token`.withInput(token.value).run()
const pullRequestUrl = command`gh pr create --fill --base ${mainBranch}`.run()
const labelArgs = labels?.flatMap((label) => ['--label', label]) ?? []
const pullRequestUrl = command`gh pr create --fill --base ${mainBranch} ${labelArgs}`.run()
return pullRequestUrl.trim()
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/test/bump-chrome-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runMain(async () => {

printLog('Create PR...')

const pullRequestUrl = createPullRequest(MAIN_BRANCH)
const pullRequestUrl = createPullRequest(MAIN_BRANCH, ['dependencies'])
printLog(`Chrome version bump PR created (from ${CURRENT_PACKAGE_VERSION} to ${packageVersion}).`)

// used to share the pull request url to the notification jobs
Expand Down
Loading