Repository navigation
feat: add GitHub setup script and 100-star Sponsors watcher - #56
Merged
Merged
Conversation
setup_github.py sets labels, issue types and fields, the roadmap project, milestones and the backlog, and is safe to re-run. stars.yml opens one issue when the repo reaches 100 stars. A Markdown issue template lets the community profile see our issue templates, and Dependabot now uses only the dependencies label.
Only duplicate, invalid, question and wontfix are ever deleted, and only when no issue in any state uses them. A skipped optional step now prints a loud summary and exits 2. The new-repo security defaults turn on private vulnerability reporting, the seed issue no longer cites a subcommand that doesn't exist yet, and stars.py raises when the issue search returns nothing.
A 403 asking for GitHub Team means the feature isn't on our plan, not that the run broke, so it no longer makes the script exit 2. Any other error still does. The step stays so it works if the org upgrades.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in here:
scripts/admin/setup_github.pysets up the GitHub side of the project: labels, org issue types and issue fields, the DevStream Roadmap project with its fields and views, the three milestones, and the backlog issues with their epics, blockers and project fields. It also sets the repo description, the org profile and the security defaults for new repos. It looks before it writes, so running it again changes nothing, and on issues that already exist it only fills in what's empty.scripts/stars.pyand.github/workflows/stars.ymlcheck the star count once a day. At 100 stars they open one issue saying it's time to turn on GitHub Sponsors, with theFUNDING.ymlsteps. Below 100 they do nothing..github/ISSUE_TEMPLATE/other.mdgives the community profile a Markdown template to find. It doesn't count issue forms, which is why it showedissue_template: false..github/dependabot.ymllabels Dependabot PRsdependenciesonly, so ecosystem labels likejavascriptstop reappearing.Tests:
python3 -m unittest discover -s scripts -t .passes, and action-validator passes onstars.yml.Part of the v0.1 launch.