You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/10/04 08:03:56 UTC

[logging-parent] 01/02: Improve `merge-dependabot-reusable.yaml` (#38)

This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git

commit 2940267797df20bc3c7b3187029515fae147650f
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Wed Oct 4 09:54:48 2023 +0200

    Improve `merge-dependabot-reusable.yaml` (#38)
---
 .github/workflows/merge-dependabot-reusable.yaml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/merge-dependabot-reusable.yaml b/.github/workflows/merge-dependabot-reusable.yaml
index 8fee8d9..c2ec308 100644
--- a/.github/workflows/merge-dependabot-reusable.yaml
+++ b/.github/workflows/merge-dependabot-reusable.yaml
@@ -108,11 +108,15 @@ jobs:
                  xmlns="http://logging.apache.org/log4j/changelog"
                  xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
                  type="changed">
+            <issue id="$PR_ID" link="$PR_URL"/>
             <author id="github:dependabot"/>
             <description format="asciidoc">Update \`$DEPENDENCY_NAME\` to version \`$DEPENDENCY_VERSION\`</description>
           </entry>
           EOF
           fi
+        env:
+          PR_URL: ${{ github.event.pull_request.html_url }}
+          PR_ID: ${{ github.event.pull_request.id }}
 
       - name: Generate sources
         shell: bash
@@ -127,11 +131,15 @@ jobs:
           git add .
           git config user.name "ASF Logging Services RM"
           git config user.email private@logging.apache.org
-          git commit -S -a -m "Update \`$DEPENDENCY_NAME\` to version \`$DEPENDENCY_VERSION\`"
+          git commit -S -a -m "Update \`$DEPENDENCY_NAME\` to version \`$DEPENDENCY_VERSION\` (#$PR_ID)"
           git push origin
+          COMMIT_ID=$(git rev-parse HEAD)
+          echo "COMMIT_ID=$COMMIT_ID" >> $GITHUB_ENV
+        env:
+          PR_ID: ${{ github.event.pull_request.id }}
 
       - name: Close the PR
-        run: gh pr close "$PR_URL" -c "Changes are applied by CI"
+        run: gh pr close "$PR_URL" -c "Changes are applied by CI in $COMMIT_ID"
         env:
           PR_URL: ${{ github.event.pull_request.html_url }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}