From f2c8e89053ee27243d8ce1be56a1b36a8077a5cd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 May 2022 18:51:22 +0100 Subject: [PATCH] Make pull_request.yaml between the layers consistent and fix enforce labels (#22172) --- .editorconfig | 3 +++ .github/workflows/preview_changelog.yaml | 12 ------------ .github/workflows/pull_request.yaml | 25 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/preview_changelog.yaml create mode 100644 .github/workflows/pull_request.yaml diff --git a/.editorconfig b/.editorconfig index 880331a09e..56631484cd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -21,3 +21,6 @@ insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.github/workflows/preview_changelog.yaml b/.github/workflows/preview_changelog.yaml deleted file mode 100644 index d68d19361d..0000000000 --- a/.github/workflows/preview_changelog.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: Preview Changelog -on: - pull_request_target: - types: [ opened, edited, labeled ] -jobs: - changelog: - runs-on: ubuntu-latest - steps: - - name: Preview Changelog - uses: matrix-org/allchange@main - with: - ghToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml new file mode 100644 index 0000000000..8d115062ea --- /dev/null +++ b/.github/workflows/pull_request.yaml @@ -0,0 +1,25 @@ +name: Pull Request +on: + pull_request_target: + types: [ opened, edited, labeled, unlabeled, synchronize ] +jobs: + changelog: + name: Preview Changelog + if: github.event.action != 'synchronize' + runs-on: ubuntu-latest + steps: + - uses: matrix-org/allchange@main + with: + ghToken: ${{ secrets.GITHUB_TOKEN }} + + enforce-label: + name: Enforce Labels + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - uses: yogevbd/enforce-label-action@2.1.0 + with: + REQUIRED_LABELS_ANY: "T-Defect,T-Enhancement,T-Task" + BANNED_LABELS: "X-Blocked" + BANNED_LABELS_DESCRIPTION: "Preventing merge whilst PR is marked blocked!"