From 031561194859f8e20b27c05eebb477e0ea2600e2 Mon Sep 17 00:00:00 2001 From: derrynknife Date: Sat, 17 Oct 2026 07:35:56 +1000 Subject: [PATCH] Branches are now dev and main (master renamed to main) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B --- .github/workflows/actions.yml | 4 ++-- .github/workflows/close-issues.yml | 4 ++-- .github/workflows/docs.yml | 4 ++-- .github/workflows/release.yml | 16 ++++++++-------- CONTRIBUTING.md | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 192ca330..32b4b330 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -2,12 +2,12 @@ name: actions run-name: RePyability CI -# The one automated test run: the full suite on a pull request into master +# The one automated test run: the full suite on a pull request into main # (from dev). Nothing else runs it; release.yml publishes only what it # passed. on: pull_request: - branches: [master] + branches: [main] jobs: lint: diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index fcdfbcc4..ac2d3d77 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -2,10 +2,10 @@ name: close issues # Close the issues a pull request into dev finishes, when it merges. # GitHub itself closes an issue only when the pull request that says -# "Closes #N" merges into the default branch (master), which here happens +# "Closes #N" merges into the default branch (main), which here happens # at a release: this closes them as the work reaches dev, with a comment # naming the pull request. It runs no tests (the one automated test run -# is actions.yml, on the pull request from dev into master). +# is actions.yml, on the pull request from dev into main). on: pull_request: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1ed7cf2d..c0e84d18 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ name: docs # Build the MkDocs site and publish it to GitHub Pages on every push to -# master. Pull requests are validated by the strict docs build in +# main. Pull requests are validated by the strict docs build in # actions.yml; this workflow does the actual deployment. # # One-time repository setup (Settings -> Pages -> Build and deployment): @@ -9,7 +9,7 @@ name: docs on: push: - branches: [master] + branches: [main] workflow_dispatch: # Grant the GITHUB_TOKEN the permissions the Pages deployment needs. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5646152..41c7f179 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,12 +2,12 @@ name: release # Publishes the package to PyPI, in either of two ways. # -# 1. Run this workflow by hand on master (Actions -> release -> Run workflow; -# `gh workflow run release.yml --ref master -f version=X.Y`; or the REST +# 1. Run this workflow by hand on main (Actions -> release -> Run workflow; +# `gh workflow run release.yml --ref main -f version=X.Y`; or the REST # API). It checks that the version typed in matches # repyability/_version.py, that CHANGELOG.md has a dated section for it, # that the tag vX.Y does not exist yet, that the full suite passed on -# these files (on the pull request from dev into master) and +# these files (on the pull request from dev into main) and # that PyPI does not have the version. It then builds, publishes to PyPI, # and last creates the tag vX.Y and a GitHub Release. The release notes # open with the CHANGELOG section's summary, followed by GitHub's @@ -71,8 +71,8 @@ jobs: echo "::error::'$REQUESTED' isn't major.minor: versions have two parts (e.g. 0.11)." exit 1 fi - if [ "$GITHUB_REF" != "refs/heads/master" ]; then - echo "::error::Releases are cut from master, not $GITHUB_REF." + if [ "$GITHUB_REF" != "refs/heads/main" ]; then + echo "::error::Releases are cut from main, not $GITHUB_REF." exit 1 fi version=$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' repyability/_version.py) @@ -88,9 +88,9 @@ jobs: echo "::error::The tag v$version already exists." exit 1 fi - # The full suite runs on the pull request from dev into master + # The full suite runs on the pull request from dev into main # (actions.yml), whose run is recorded against dev's commit. The - # merge commit on master holds the same files, so a pass on this + # merge commit on main holds the same files, so a pass on this # commit, or on a parent with the same files, counts. repo="repos/$GITHUB_REPOSITORY" tree=$(gh api "$repo/git/commits/$GITHUB_SHA" --jq '.tree.sha') @@ -104,7 +104,7 @@ jobs: fi done if [ -z "$passed" ]; then - echo "::error::The full suite (actions.yml) has not passed on these files: on $GITHUB_SHA or the dev commit it merged. Open the pull request from dev into master and wait for it." + echo "::error::The full suite (actions.yml) has not passed on these files: on $GITHUB_SHA or the dev commit it merged. Open the pull request from dev into main and wait for it." exit 1 fi echo "The full suite passed on $passed, with the same files as $GITHUB_SHA." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49fa6fdd..133dca4b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,10 +23,10 @@ RePyability needs Python 3.11 or later and surpyval 0.24 or later. ## Branches and the one automated test run Work branches off **`dev`** and goes back into `dev` by pull request. -Releases go from `dev` into `master`. +Releases go from `dev` into `main`. There is **one automated test run**: the full suite on the pull request from -`dev` into `master` (`.github/workflows/actions.yml`). Nothing runs on pushes +`dev` into `main` (`.github/workflows/actions.yml`). Nothing runs on pushes or on pull requests into `dev`, so check your change locally before it goes in: @@ -118,10 +118,10 @@ release: `[Unreleased]` section into a dated `## [X.Y] - YYYY-MM-DD` section. Its opening paragraphs become the summary at the top of the release notes. Update the version in `docs/guide/saving.md`. Merge to `dev`, then open - the pull request from `dev` into `master`, which runs the full suite. -2. Once it has passed, merge it and run the `release` workflow on master + the pull request from `dev` into `main`, which runs the full suite. +2. Once it has passed, merge it and run the `release` workflow on main with the version: Actions → release → Run workflow, or - `gh workflow run release.yml --ref master -f version=X.Y`. Add + `gh workflow run release.yml --ref main -f version=X.Y`. Add `-f dry_run=true` to check and build without publishing. The workflow checks the version, the CHANGELOG section, that the tag is new, that CI passed and that PyPI does not have the version. Then it builds, publishes