From 7a441c4f30b5da51251dea3d3cd78b287b341595 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Mon, 3 Oct 2022 11:30:21 +0100 Subject: [PATCH] Protoype automatic changelogs for dependabot PRs (#13998) --- .github/workflows/dependabot_changelog.yml | 23 ++++++++++++++++++++++ changelog.d/13998.misc | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/dependabot_changelog.yml create mode 100644 changelog.d/13998.misc diff --git a/.github/workflows/dependabot_changelog.yml b/.github/workflows/dependabot_changelog.yml new file mode 100644 index 0000000000..9fef12a91c --- /dev/null +++ b/.github/workflows/dependabot_changelog.yml @@ -0,0 +1,23 @@ +name: Write changelog for dependabot PR +on: + pull_request: + types: + - opened + +jobs: + add-changelog: + runs-on: 'ubuntu-latest' + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Write, commit and push changelog + run: | + echo "${{ github.event.pull_request.title }}." > "changelog.d/${{ github.event.pull_request.number }}".docker + git add changelog.d + git config user.email "github-actions[bot]@users.noreply.github.com" + git config user.name "GitHub Actions" + git commit -m "Changelog" + git push + shell: bash diff --git a/changelog.d/13998.misc b/changelog.d/13998.misc new file mode 100644 index 0000000000..7d793b56e0 --- /dev/null +++ b/changelog.d/13998.misc @@ -0,0 +1 @@ +Prototype a workflow to automatically add changelogs to dependabot PRs.