Skip to content

Commit 4158d7c

Browse files
committed
ci: add --label beta filter to only process PRs with beta label
1 parent 425abe2 commit 4158d7c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

script/beta.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface PR {
77
number: number
88
title: string
99
author: { login: string }
10+
labels: Array<{ name: string }>
1011
}
1112

1213
interface FailedPR {
@@ -31,12 +32,13 @@ Please resolve this issue to include this PR in the next beta release.`
3132
}
3233

3334
async function main() {
34-
console.log("Fetching open PRs from team members...")
35+
console.log("Fetching open PRs with beta label from team members...")
3536

3637
const allPrs: PR[] = []
3738
for (const member of Script.team) {
3839
try {
39-
const stdout = await $`gh pr list --state open --author ${member} --json number,title,author --limit 100`.text()
40+
const stdout =
41+
await $`gh pr list --state open --author ${member} --label beta --json number,title,author,labels --limit 100`.text()
4042
const memberPrs: PR[] = JSON.parse(stdout)
4143
allPrs.push(...memberPrs)
4244
} catch {
@@ -51,7 +53,7 @@ async function main() {
5153
return true
5254
})
5355

54-
console.log(`Found ${prs.length} open PRs from team members`)
56+
console.log(`Found ${prs.length} open PRs with beta label from team members`)
5557

5658
if (prs.length === 0) {
5759
console.log("No team PRs to merge")

0 commit comments

Comments
 (0)