You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/09/17 13:55:17 UTC
(logging-parent) branch main updated: Allow GitHub to mark a PR as `merged` not `closed` (#242)
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/main by this push:
new 01fd118 Allow GitHub to mark a PR as `merged` not `closed` (#242)
01fd118 is described below
commit 01fd118fed124c704c30f228a3fe8b412b75e6cd
Author: Piotr P. Karwasz <pi...@github.copernik.eu>
AuthorDate: Tue Sep 17 15:55:12 2024 +0200
Allow GitHub to mark a PR as `merged` not `closed` (#242)
We reverse the order of updates to the PR branch and main branch
and allow GitHub time to realize that both branches have the same ref.
This should always mark the PR as "merged", while currently it often
is marked as "closed".
---
.github/workflows/merge-dependabot-reusable.yaml | 6 ++++--
src/changelog/.11.x.x/pr-merge-race-condition.xml | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/merge-dependabot-reusable.yaml b/.github/workflows/merge-dependabot-reusable.yaml
index 77beb86..1a02019 100644
--- a/.github/workflows/merge-dependabot-reusable.yaml
+++ b/.github/workflows/merge-dependabot-reusable.yaml
@@ -122,6 +122,8 @@ jobs:
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\` (#$PR_ID)"
- git push origin
- # Pushing the same commit to the Dependebot branch closes the PR
+ # Pushing the same commit to the Dependabot and main branch closes the PR
git push -f origin "HEAD:$PR_BRANCH"
+ # Allow for GitHub to realize that the PR branch changed
+ sleep 5
+ git push origin
diff --git a/src/changelog/.11.x.x/pr-merge-race-condition.xml b/src/changelog/.11.x.x/pr-merge-race-condition.xml
new file mode 100644
index 0000000..9230e8a
--- /dev/null
+++ b/src/changelog/.11.x.x/pr-merge-race-condition.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://logging.apache.org/xml/ns"
+ xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="fixed">
+ <description format="asciidoc">Fix race condition, which marks merged Dependabot PRs as closed.</description>
+</entry>