From dc055d341609960f82c521670c26c1cd91512cb7 Mon Sep 17 00:00:00 2001 From: steebchen Date: Fri, 10 May 2024 16:10:07 +0100 Subject: [PATCH 1/2] chore(dependabot): add config for git submodule and GH actions do not add python deps yet as there is no proper test suite --- .github/dependabot.yml | 11 +++++++++++ .github/workflows/auto-merge.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..902232d0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..7200e181 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,26 @@ +name: auto-merge + +on: + pull_request_target: + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + permissions: + pull-requests: write + issues: write + repository-projects: write + contents: write + steps: + - name: "Metadata" + id: metadata + uses: dependabot/fetch-metadata@v2.0.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: "Enable auto-squash" + if: steps.metadata.outputs.package-ecosystem == 'submodules' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 8d53b69d846fa92b571807a27ff8f66b0ad79b1e Mon Sep 17 00:00:00 2001 From: steebchen Date: Fri, 17 May 2024 15:13:18 +0100 Subject: [PATCH 2/2] auto approve --- .github/workflows/auto-merge.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 7200e181..4785f664 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -24,3 +24,10 @@ jobs: env: PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Approve (minor & patch)" + id: approve + if: steps.metadata.outputs.package-ecosystem == 'submodules' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}