mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-18 13:50:04 +00:00
ci/github-script/bot.js: make llm-assisted label sticky
By popular demand, this patch lets folks manually label PRs with the label and make it stick, even if auto-labeler wouldn't label it itself (presumably because the author didn't mark their commits according to automation policy). Assisted-by: Codex gpt-5.6-sol medium
This commit is contained in:
@@ -397,11 +397,11 @@ export default async ({ github, context, core, dry }) => {
|
||||
per_page: 100,
|
||||
})
|
||||
|
||||
// label llm-assisted PRs accordingly
|
||||
// label llm-assisted PRs accordingly, retaining it if manually set
|
||||
const assistedByPattern = /Assisted-by: (?!nix-init)/i
|
||||
evalLabels['llm-assisted'] = prCommits.some((c) =>
|
||||
assistedByPattern.test(c.commit.message),
|
||||
)
|
||||
if (prCommits.some((c) => assistedByPattern.test(c.commit.message))) {
|
||||
evalLabels['llm-assisted'] = true
|
||||
}
|
||||
|
||||
const commitSubjects = prCommits.map(
|
||||
(c) => c.commit.message.split('\n')[0],
|
||||
|
||||
Reference in New Issue
Block a user