fix(release): make opencollective optional

This commit is contained in:
macayu17 2026-06-27 07:34:28 +05:30
parent 390daa8605
commit 03b03a67d9
2 changed files with 11 additions and 2 deletions

View file

@ -321,11 +321,19 @@ def main() -> int:
metavar="FILE",
help="Write the section to FILE instead of stdout.",
)
parser.add_argument(
"--skip-opencollective",
action="store_true",
help="Skip OpenCollective backers if the members endpoint is unavailable.",
)
args = parser.parse_args()
try:
since = compute_since_date(args.since)
section = render(since, github_sponsors(since), opencollective_sponsors(since))
oc_sponsors = []
if not args.skip_opencollective:
oc_sponsors = opencollective_sponsors(since)
section = render(since, github_sponsors(since), oc_sponsors)
except SponsorDataError as exc:
print(f"error: {exc}", file=sys.stderr)
return 1

View file

@ -14,6 +14,7 @@ Type the would-be tag name in the "Choose a tag" field and press "Generate relea
Paste the output at the end of the release notes.
* This lists new GitHub Sponsors and OpenCollective backers since the last release or within the last month, whichever is longer.
* The GitHub Sponsors query requires the `gh` CLI with the `read:user` scope.
* If OpenCollective is unavailable, pass `--skip-opencollective` and add those backers manually.
* Update `CHANGELOG.md` with the new version number and the edited summary (only the changes section)
* Push the version number in `libexec/pyenv---version` and `plugins/python-build/bin/python-build`
* Minor version is pushed if there are significant functional changes (not e.g. bugfixes/formula adaptations/supporting niche use cases).
@ -21,4 +22,4 @@ Type the would-be tag name in the "Choose a tag" field and press "Generate relea
* Commit the changes locally into `master`
* Create a new tag locally with the same name as specified in the new release window
* Push the changes including the tag
* In the still open new release window, press "Publish release". The now-existing tag will be used.
* In the still open new release window, press "Publish release". The now-existing tag will be used.