Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd748c4

Browse files
authored
Merge branch 'develop' into renovate/lucide-monorepo
2 parents 9c32ad7 + 44a6367 commit dd748c4

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/approvals.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,20 @@ jobs:
2323
pull_number: pr.number,
2424
});
2525
26-
// Count unique human approvals (latest review per user)
26+
// Determine if PR author is a bot/GitHub Actions
27+
const authorType = pr.user.type; // 'Bot' vs 'User'
28+
const authorLogin = pr.user.login; // e.g. 'github-actions[bot]'
29+
const isBot = authorType === 'Bot' || authorLogin.endsWith('[bot]');
30+
const oneApprovalBotAuthors = new Set(['renovate[bot]']);
31+
32+
// Count unique approvals, including bot approvals.
2733
const latestByUser = {};
2834
for (const review of reviews.data) {
29-
if (review.user.type === 'Bot') continue;
3035
latestByUser[review.user.login] = review.state;
3136
}
3237
const approvalCount = Object.values(latestByUser)
3338
.filter(state => state === 'APPROVED').length;
3439
35-
// Determine if PR author is a bot/GitHub Actions
36-
const authorType = pr.user.type; // 'Bot' vs 'User'
37-
const authorLogin = pr.user.login; // e.g. 'github-actions[bot]'
38-
const isBot = authorType === 'Bot' || authorLogin.endsWith('[bot]');
39-
const oneApprovalBotAuthors = new Set(['renovate[bot]']);
40-
4140
const required = isBot && !oneApprovalBotAuthors.has(authorLogin) ? 2 : 1;
4241
4342
console.log(`PR author: ${authorLogin} (${authorType}), isBot: ${isBot}`);
@@ -46,7 +45,7 @@ jobs:
4645
4746
if (isBot && (approvalCount < required)) {
4847
core.setFailed(
49-
`This PR needs ${required} human approval(s) but has ${approvalCount}. ` +
48+
`This PR needs ${required} approval(s) but has ${approvalCount}. ` +
5049
`(Author is ${isBot ? 'a bot' : 'human'})`
5150
);
5251
}

.github/workflows/claude-review.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ name: Claude Code (Review)
1919
# - PR conversation comments on PRs already opened by the Claude App are handled by
2020
# claude-write.yml so maintainers can ask Claude to make follow-up changes there.
2121

22-
concurrency:
23-
# `issue_comment` events on PRs expose the PR number via `github.event.issue.number`,
24-
# so this falls back there when `github.event.pull_request.number` is unset.
25-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.run_id }}
26-
cancel-in-progress: true
27-
2822
on:
2923
issue_comment:
3024
types: [created]
@@ -226,6 +220,11 @@ jobs:
226220
if: needs.gate.outputs.should_run == 'true'
227221
runs-on: ubuntu-latest
228222
timeout-minutes: 45
223+
concurrency:
224+
# `issue_comment` events on PRs expose the PR number via `github.event.issue.number`,
225+
# so this falls back there when `github.event.pull_request.number` is unset.
226+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.run_id }}
227+
cancel-in-progress: true
229228
permissions:
230229
contents: read
231230
issues: write

.github/workflows/claude-write.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ name: Claude Code (Write)
2727
# than the numeric App ID in the PR payload, so the gate checks `CLAUDE_APP_LOGIN`
2828
# instead of comparing directly to `APP_ID`.
2929

30-
concurrency:
31-
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
32-
cancel-in-progress: true
33-
3430
on:
3531
issues:
3632
types: [opened, assigned]
@@ -152,6 +148,9 @@ jobs:
152148
if: needs.gate.outputs.should_run == 'true'
153149
runs-on: ubuntu-latest
154150
timeout-minutes: 60
151+
concurrency:
152+
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
153+
cancel-in-progress: true
155154

156155
environment:
157156
# The App private key lives only in this environment so only this single job

0 commit comments

Comments
 (0)