diff --git a/.github/workflows/autoupdate-labeler.yml b/.github/workflows/autoupdate-labeler.yml deleted file mode 100644 index 974c9fa7..00000000 --- a/.github/workflows/autoupdate-labeler.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label. - -name: Label PR autoupdate - -on: - pull_request_target: - types: - - edited - - opened - - reopened - - synchronize - -jobs: - label_pr: - if: >- - startsWith(github.repository, 'LizardByte/') && - contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"')) - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} - steps: - - name: Check if member - id: org_member - run: | - status="true" - gh api \ - -H "Accept: application/vnd.github+json" \ - /orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false" - - echo "result=${status}" >> $GITHUB_OUTPUT - - - name: Label autoupdate - if: >- - steps.org_member.outputs.result == 'true' && - contains(github.event.pull_request.labels.*.name, 'autoupdate') == false && - contains(github.event.pull_request.body, - fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GH_BOT_TOKEN }} - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['autoupdate'] - }) - - - name: Unlabel autoupdate - if: >- - contains(github.event.pull_request.labels.*.name, 'autoupdate') && - ( - (github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') || - (contains(github.event.pull_request.body, - fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false - ) - ) - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GH_BOT_TOKEN }} - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ['autoupdate'] - }) diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/autoupdate.yml deleted file mode 100644 index 83f4e161..00000000 --- a/.github/workflows/autoupdate.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# This workflow is designed to work with the following workflows: -# - automerge -# - autoupdate-labeler - -# It uses an action that auto-updates pull requests branches, when changes are pushed to their destination branch. -# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks. -# Dependabot PRs are updated by an action that comments `@depdenabot rebase` on dependabot PRs. (disabled) - -name: autoupdate - -on: - push: - branches: - - 'nightly' - -jobs: - autoupdate: - name: Autoupdate autoapproved PR created in the upstream - if: startsWith(github.repository, 'LizardByte/') - runs-on: ubuntu-latest - steps: - - name: Update - uses: docker://chinthakagodawita/autoupdate-action:v1 - env: - EXCLUDED_LABELS: "central_dependency,dependencies" - GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}' - PR_FILTER: "labelled" - PR_LABELS: "autoupdate" - PR_READY_STATE: "all" - MERGE_CONFLICT_ACTION: "fail" - -# Disabled due to: -# - no major version tag, resulting in constant nagging to update this action -# - additionally, the code is sketchy, 16k+ lines of code? -# https://github.com/bbeesley/gha-auto-dependabot-rebase/blob/main/dist/main.cjs -# -# dependabot-rebase: -# name: Dependabot Rebase -# if: >- -# startsWith(github.repository, 'LizardByte/') -# runs-on: ubuntu-latest -# steps: -# - name: rebase -# uses: "bbeesley/gha-auto-dependabot-rebase@v1.3.18" -# env: -# GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml deleted file mode 100644 index 58243872..00000000 --- a/.github/workflows/pull-requests.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# Ensure PRs are made against `nightly` branch. - -name: Pull Requests - -on: - pull_request_target: - types: [opened, synchronize, edited, reopened] - -# no concurrency for pull_request_target events - -jobs: - check-pull-request: - name: Check Pull Request - if: startsWith(github.repository, 'LizardByte/') - runs-on: ubuntu-latest - steps: - - uses: Vankka/pr-target-branch-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - target: master - exclude: nightly # Don't prevent going from nightly -> master - change-to: nightly - comment: | - Your PR was set to `master`, PRs should be sent to `nightly`. - The base branch of this PR has been automatically changed to `nightly`. - Please check that there are no merge conflicts