Skip to content
Merged
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
75 changes: 75 additions & 0 deletions .github/workflows/wiki-refresh-reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Wiki Refresh Reminder

on:
schedule:
- cron: "0 6 1 * *"
workflow_dispatch:

permissions:
contents: read
issues: write

jobs:
open-wiki-refresh-issue:
runs-on: ubuntu-latest
steps:
- name: Create monthly wiki refresh issue
uses: actions/github-script@v7
with:
script: |
const now = new Date();
const year = now.getUTCFullYear();
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
const period = `${year}-${month}`;
const title = `Wiki refresh - ${period}`;
const wikiBase = `https://github.com/${context.repo.owner}/${context.repo.repo}/wiki`;

const query = `repo:${context.repo.owner}/${context.repo.repo} is:issue in:title "${title}"`;
const result = await github.rest.search.issuesAndPullRequests({
q: query,
per_page: 1,
});

if (result.data.total_count > 0) {
const existing = result.data.items[0];
if (existing.state === 'closed') {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: existing.number,
state: 'open',
});
core.info(`Reopened existing issue #${existing.number} for ${period}.`);
return;
}
core.info(`Issue #${existing.number} already exists for ${period}. Skipping.`);
return;
}

const body = [
'## Monthly Wiki Refresh Checklist',
'',
`Period: ${period}`,
'',
'Keep the club wiki current by reviewing and updating the following:',
'',
'- Validate social and communication links.',
'- Update event timeline entries for newly completed events.',
'- Verify roster/role changes are reflected in wiki pages.',
'- Confirm Home and sidebar navigation links are still valid.',
'- Ensure no personal phone numbers are exposed in public wiki pages.',
'',
'Reference pages:',
`- ${wikiBase}/Wiki-Update-Protocol`,
`- ${wikiBase}/Social-Handles-and-Official-Channels`,
`- ${wikiBase}/Event-Timeline-and-Archive`,
].join('\n');

await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
});

core.info(`Created wiki refresh issue: ${title}`);
Loading