@@ -296,48 +296,3 @@ jobs:
296296 asset_id: asset.id
297297 });
298298 }
299-
300- # Job 5: Notify on failure
301- notify-failure :
302- name : Notify on Failure
303- needs : [check-versions, build, release, publish-nuget]
304- if : failure()
305- runs-on : ubuntu-latest
306-
307- steps :
308- - name : Create failure issue
309- uses : actions/github-script@v7
310- with :
311- script : |
312- const title = `Build failed on ${new Date().toISOString().split('T')[0]}`;
313- const body = `
314- ## Build Failure Report
315-
316- The automated build workflow failed. Please investigate.
317-
318- **Workflow Run:** [View Details](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})
319-
320- **Triggered by:** ${context.eventName}
321-
322- Please check the workflow logs for more details.
323- `;
324-
325- // Check if a similar issue already exists
326- const issues = await github.rest.issues.listForRepo({
327- owner: context.repo.owner,
328- repo: context.repo.repo,
329- state: 'open',
330- labels: 'build-failure'
331- });
332-
333- const existingIssue = issues.data.find(i => i.title.startsWith('Build failed on'));
334-
335- if (!existingIssue) {
336- await github.rest.issues.create({
337- owner: context.repo.owner,
338- repo: context.repo.repo,
339- title: title,
340- body: body,
341- labels: ['build-failure', 'automated']
342- });
343- }
0 commit comments