From 4ff8e4ede32b8af3e3ed63f3e8dd155b7ed643c4 Mon Sep 17 00:00:00 2001 From: Thomas Lebeau Date: Wed, 3 Jun 2026 09:14:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20'dependencies'=20label=20t?= =?UTF-8?q?o=20bump-chrome-version=20PRs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lib/gitUtils.ts | 5 +++-- scripts/test/bump-chrome-version.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/lib/gitUtils.ts b/scripts/lib/gitUtils.ts index bc31baace0..5742dde18e 100644 --- a/scripts/lib/gitUtils.ts +++ b/scripts/lib/gitUtils.ts @@ -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() } diff --git a/scripts/test/bump-chrome-version.ts b/scripts/test/bump-chrome-version.ts index a916202999..b4f38573ab 100644 --- a/scripts/test/bump-chrome-version.ts +++ b/scripts/test/bump-chrome-version.ts @@ -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