From 3506459385092db5f8f999c50eed4d394ed9b5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Wed, 17 Jan 2024 21:25:08 +0100 Subject: [PATCH 1/3] Adding Validate Pull Request GitHub Actions workflow to check PRs for merge conflicts --- .github/workflows/validate_pr.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/validate_pr.yml diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml new file mode 100644 index 00000000000..cdc414f909d --- /dev/null +++ b/.github/workflows/validate_pr.yml @@ -0,0 +1,22 @@ +name: Validate Pull Request + +on: + push: + pull_request_target: + types: [opened, synchronize] + +jobs: + validate-pull-request: + name: Validate Pull Request + runs-on: ubuntu-22.04 + timeout-minutes: 3 + steps: + - name: Check for Merge Conflict in PR + # releases/2.1.0 + uses: eps1lon/actions-label-merge-conflict@92924ba33a60e436034b0ac3838de523bf7df071 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + commentOnDirty: "This pull request has merge conflicts. Please resolve those before requesting a review." + dirtyLabel: "merge conflict" + # The default 120 is too long. The mergeable state is usually calculated by GitHub within seconds. + retryAfter: 5 \ No newline at end of file From a89e38ca77f64c2524e567096766c400645d46b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Wed, 17 Jan 2024 21:26:00 +0100 Subject: [PATCH 2/3] End of file newline --- .github/workflows/validate_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index cdc414f909d..2b2db49fb9a 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -19,4 +19,4 @@ jobs: commentOnDirty: "This pull request has merge conflicts. Please resolve those before requesting a review." dirtyLabel: "merge conflict" # The default 120 is too long. The mergeable state is usually calculated by GitHub within seconds. - retryAfter: 5 \ No newline at end of file + retryAfter: 5 From 430d86f34986fb71506a0896a92e25c5ccb58c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Wed, 17 Jan 2024 21:26:43 +0100 Subject: [PATCH 3/3] Let's run it always on the latest Ubuntu --- .github/workflows/validate_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index 2b2db49fb9a..85ed3f9c2a5 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -8,7 +8,7 @@ on: jobs: validate-pull-request: name: Validate Pull Request - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest timeout-minutes: 3 steps: - name: Check for Merge Conflict in PR