From f1e28d1e436b852a92d6d2dc5ae7c080b006c748 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Sun, 10 Jan 2021 21:33:46 +0100 Subject: [PATCH] GH action - label conflicts (#5450) * GH action - label conflicts * . * trigger * trigger * . --- .github/workflows/ci_dockers.yml | 2 +- .../{nightly.yml => events-nightly.yml} | 0 .github/workflows/events-recurrent.yml | 21 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) rename .github/workflows/{nightly.yml => events-nightly.yml} (100%) create mode 100644 .github/workflows/events-recurrent.yml diff --git a/.github/workflows/ci_dockers.yml b/.github/workflows/ci_dockers.yml index 43550ade87..1f5e5c2315 100644 --- a/.github/workflows/ci_dockers.yml +++ b/.github/workflows/ci_dockers.yml @@ -14,7 +14,7 @@ on: # Trigger the workflow on push or pull request, but only for the master bran - "environment.yml" - "requirements.txt" - ".github/workflows/ci_dockers.yml" - - ".github/workflows/nightly.yml" + - ".github/workflows/events-nightly.yml" - ".github/workflows/release-docker.yml" - "setup.py" diff --git a/.github/workflows/nightly.yml b/.github/workflows/events-nightly.yml similarity index 100% rename from .github/workflows/nightly.yml rename to .github/workflows/events-nightly.yml diff --git a/.github/workflows/events-recurrent.yml b/.github/workflows/events-recurrent.yml new file mode 100644 index 0000000000..a618112469 --- /dev/null +++ b/.github/workflows/events-recurrent.yml @@ -0,0 +1,21 @@ +on: + # We recommend `pull_request_target` so that github secrets are available. + # In `pull_request` we wouldn't be able to change labels of fork PRs + pull_request_target: + types: [ synchronize ] + +jobs: + + # This label will then be managed by this action. + # It will be added to PRs with merge conflicts and removed from PRs without conflicts. + # https://github.com/mschilde/auto-label-merge-conflicts + pr-label-conflicts: + name: Label PR conflits + runs-on: ubuntu-20.04 + steps: + - uses: mschilde/auto-label-merge-conflicts@v2 + with: + CONFLICT_LABEL_NAME: "has conflicts" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAX_RETRIES: 3 + WAIT_MS: 5000