From e337063acffd00c5dfad39529a0f322d86c2d0cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 24 Dec 2023 10:31:13 +0100 Subject: [PATCH] Don't run reviewer lottery from bots (#397) (#398) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Don't run reviewer lottery from bots * Add own context testing workflow (cherry picked from commit 159e89b0984c95bc5a466d6ef6137734b7015a61) Co-authored-by: Christoph Fröhlich --- .github/workflows/context_testing.yml | 32 ++++++++++++++++++++++++++ .github/workflows/reviewer_lottery.yml | 7 ++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/context_testing.yml diff --git a/.github/workflows/context_testing.yml b/.github/workflows/context_testing.yml new file mode 100644 index 000000000..ada55b7af --- /dev/null +++ b/.github/workflows/context_testing.yml @@ -0,0 +1,32 @@ +name: Context testing +on: + pull_request: + +jobs: + dump_contexts_to_log: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Dump job context + env: + JOB_CONTEXT: ${{ toJson(job) }} + run: echo "$JOB_CONTEXT" + - name: Dump steps context + env: + STEPS_CONTEXT: ${{ toJson(steps) }} + run: echo "$STEPS_CONTEXT" + - name: Dump runner context + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + run: echo "$RUNNER_CONTEXT" + - name: Dump strategy context + env: + STRATEGY_CONTEXT: ${{ toJson(strategy) }} + run: echo "$STRATEGY_CONTEXT" + - name: Dump matrix context + env: + MATRIX_CONTEXT: ${{ toJson(matrix) }} + run: echo "$MATRIX_CONTEXT" diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml index 2edbc9b59..c0852a801 100644 --- a/.github/workflows/reviewer_lottery.yml +++ b/.github/workflows/reviewer_lottery.yml @@ -6,7 +6,14 @@ on: jobs: test: runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'mergify[bot]' }} steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" + echo "The GitHub Actor's username is: $GITHUB_ACTOR" - uses: actions/checkout@v4 - uses: uesteibar/reviewer-lottery@v3 with: