diff --git a/.github/workflows/auto-draft.yml b/.github/workflows/auto-draft.yml deleted file mode 100644 index 2c2730d849..0000000000 --- a/.github/workflows/auto-draft.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Marks all newly opened and reopened pull requests as drafts -# and adds a helpful comment to the PR - -# Run only on opened and reopened pull request events -name: Set to draft status when PR is [re]opened -on: - pull_request_target: - types: [opened, reopened] - -jobs: - mark-as-draft: - runs-on: ubuntu-latest - permissions: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions - contents: write # Required for setting draft state - pull-requests: write # Required for posting comment - steps: - # Use the gh cli tool to set the PR into draft state if opened without it - # and add a helpful comment - - name: Set to draft and add comment - continue-on-error: true # We should not block if this action fails for some reason - if: | - github.event.pull_request.draft == false && - github.actor != 'dependabot[bot]' && - github.actor != 'renovate[bot]' - shell: bash - run: | - if ! [[ "$TITLE" =~ ^nit:.* ]]; then - gh pr ready "$URL" --undo - printf "$MESSAGE" | gh pr comment "$URL" -F - - fi - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - URL: ${{ github.event.pull_request.html_url }} - TITLE: ${{ github.event.pull_request.title }} - MESSAGE: "Thanks for the PR! :heart:\nI'm marking it as a draft, once your happy with it merging and the PR is passing CI, click the \"Ready for review\" button below."