From d7fb0619a3de3e6615f3c7a9eb338891edb1b7f1 Mon Sep 17 00:00:00 2001 From: Anurag Dalke Date: Thu, 9 Apr 2026 16:40:49 +0530 Subject: [PATCH] Add auto-merge workflow for specific pull requests --- .github/workflows/auto_merged_pr.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/auto_merged_pr.yml diff --git a/.github/workflows/auto_merged_pr.yml b/.github/workflows/auto_merged_pr.yml new file mode 100644 index 0000000..9bde77a --- /dev/null +++ b/.github/workflows/auto_merged_pr.yml @@ -0,0 +1,27 @@ +name: Auto_PR_Mered +on: + pull_request: + +permissions: + contents: write + +jobs: + auto-merge-eclipse: + runs-on: ubuntu-latest + if: > + github.event.pull_request.user.login == 'cx-bot-ghinternal' && + contains(github.event.pull_request.title, 'Eclipse Plugin Release') + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Enable auto-merge for eligible PRs + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.ECLIPSE_SITE_TOKEN }} + run: gh pr merge --auto --squash "$PR_URL" + + - name: Auto approve PRs + uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 + with: + github-token: ${{ secrets.ECLIPSE_SITE_TOKEN }}