Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-tags: true

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,47 @@ jobs:
`---\n_Opened automatically by the Maintenance workflow._`,
labels: ['maintenance'],
});

close-issue-on-success:
needs: ci
if: success()
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
// Close any open maintenance issues — the most recent CI run
// proves the underlying problem is resolved. Without this job
// the issues opened by `open-issue-on-failure` linger forever
// and the repo looks broken to outside visitors even after the
// fix lands.
const open = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'maintenance',
});
if (open.data.length === 0) {
console.log('No open maintenance issues to close.');
return;
}
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
});
for (const issue of open.data) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `Maintenance CI is green again — closing automatically.\n\n**Run:** ${run.data.html_url}`,
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed',
});
console.log(`Closed issue #${issue.number}`);
}
2 changes: 1 addition & 1 deletion src/my_mcp_server/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Allow running as ``python -m my_mcp_server``."""

import sys
import logging
import sys

from my_mcp_server.server import main

Expand Down
Loading