@@ -104,9 +104,27 @@ jobs:
104104 const fs = require('fs');
105105 const log = fs.readFileSync('/tmp/lock-build.log', 'utf8');
106106 const lastLines = log.split('\n').slice(-80).join('\n');
107+ const title = 'Maintenance: flake.lock update broke build';
108+
109+ // Close any prior open report of the same failure before filing a
110+ // fresh one, so a recurring lock-build break does not pile up
111+ // duplicate issues (mirrors update.yml's update-failed dedup).
112+ const existing = await github.rest.issues.listForRepo({
113+ owner: context.repo.owner, repo: context.repo.repo,
114+ labels: 'maintenance', state: 'open'
115+ });
116+ for (const issue of existing.data) {
117+ if (issue.title !== title) continue;
118+ await github.rest.issues.update({
119+ owner: context.repo.owner, repo: context.repo.repo,
120+ issue_number: issue.number, state: 'closed',
121+ state_reason: 'not_planned'
122+ });
123+ }
124+
107125 await github.rest.issues.create({
108126 owner: context.repo.owner, repo: context.repo.repo,
109- title: 'Maintenance: flake.lock update broke build' ,
127+ title,
110128 labels: ['maintenance'],
111129 body: [
112130 '## flake.lock update failed to build',
0 commit comments