From e000cd0803381ead5e33467202104aeb020c82b4 Mon Sep 17 00:00:00 2001 From: Claudia Meadows Date: Tue, 24 Sep 2024 16:37:04 -0700 Subject: [PATCH] De-`master` the repo --- .github/workflows/issue-create.yml | 4 +--- .github/workflows/push-main.yml | 13 +++++++++++++ .github/workflows/push-master.yml | 13 ------------- .github/workflows/rollback.yml | 2 +- .github/workflows/test-next-push.yml | 4 ++-- docs/releasing.md | 4 ++-- 6 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/push-main.yml delete mode 100644 .github/workflows/push-master.yml diff --git a/.github/workflows/issue-create.yml b/.github/workflows/issue-create.yml index 852f2a17..028fd55f 100644 --- a/.github/workflows/issue-create.yml +++ b/.github/workflows/issue-create.yml @@ -4,9 +4,7 @@ on: types: [opened] pull_request_target: types: [opened] -permissions: - issues: write - repository-projects: write jobs: notify_triage: uses: MithrilJS/infra/.github/workflows/notify-triage.yml@main + secrets: inherit diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml new file mode 100644 index 00000000..aba934f3 --- /dev/null +++ b/.github/workflows/push-main.yml @@ -0,0 +1,13 @@ +name: Warn on pushing to `main` +on: + pull_request_target: + types: [opened] + branches: [main] +permissions: + issues: write +jobs: + comment: + uses: MithrilJS/infra/.github/workflows/reject-pr.yml@main + secrets: inherit + with: + correct_branch: next diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml deleted file mode 100644 index c69dd678..00000000 --- a/.github/workflows/push-master.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Warn on pushing to `master` -on: - pull_request_target: - types: [opened] - branches: [master] -permissions: - issues: write -jobs: - comment: - uses: ./.github/workflows/_post-comment.yml - with: - url: ${{ github.event.pull_request.url }} - message: ⚠⚠⚠ Hey @${{ github.actor }}, did you mean to open this against `next`? ⚠⚠⚠ diff --git a/.github/workflows/rollback.yml b/.github/workflows/rollback.yml index eb2d5fd1..6ed33b34 100644 --- a/.github/workflows/rollback.yml +++ b/.github/workflows/rollback.yml @@ -16,6 +16,6 @@ jobs: node-version: 20 - run: npm ci - run: npm run build - - run: npx pr-release rollback --verbose --target master --source next --verbose --ignore 'package*' --ignore docs/changelog.md --ignore docs/recent-changes.md + - run: npx pr-release rollback --verbose --target main --source next --verbose --ignore 'package*' --ignore docs/changelog.md --ignore docs/recent-changes.md env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/test-next-push.yml b/.github/workflows/test-next-push.yml index 3aaec97b..5df53932 100644 --- a/.github/workflows/test-next-push.yml +++ b/.github/workflows/test-next-push.yml @@ -21,7 +21,7 @@ jobs: node-version: 20 - run: npm ci - run: npm run build - - run: npx pr-release pr --verbose --target master --source next --compact --verbose --minimize-semver-change + - run: npx pr-release pr --verbose --target main --source next --compact --verbose --minimize-semver-change env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # The following will publish a prerelease to npm @@ -29,5 +29,5 @@ jobs: name: Setup NPM Auth env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: npx pr-release infer-prerelease --preid=next --target master --source next --verbose --publish --minimize-semver-change + - run: npx pr-release infer-prerelease --preid=next --target main --source next --verbose --publish --minimize-semver-change name: Publish diff --git a/docs/releasing.md b/docs/releasing.md index 28cd52f4..89bfe11f 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -50,8 +50,8 @@ Fixes to documentation can land whenever, updates to the site are built and publ $ git checkout next $ git pull mithriljs next -# Splat the docs folder from next onto master -$ git checkout master +# Splat the docs folder from next onto main +$ git checkout main $ git checkout next -- ./docs # Manually ensure that no new feature docs were added