Copilot commented on code in PR #4323:
URL: https://github.com/apache/logging-log4j2/pull/4323#discussion_r4010033135


##########
.github/workflows/analyze-dependabot.yaml:
##########
@@ -26,6 +26,24 @@ permissions: { }
 
 jobs:
 
+  # Dependency updates never need to be ported: Dependabot maintains every 
branch on its own.
+  label-dependabot:
+    if: ${{
+      github.repository == 'apache/logging-log4j2'
+      && github.actor == 'dependabot[bot]'
+      && github.event.pull_request.user.login == 'dependabot[bot]'
+      }}
+    runs-on: ubuntu-slim
+    permissions:
+      # Add the `port-done` label
+      pull-requests: write
+    steps:
+      - name: Add `port-done` label
+        env:
+          GH_TOKEN: ${{ github.token }}
+          PR: ${{ github.event.pull_request.html_url }}
+        run: gh pr edit "$PR" --add-label port-done

Review Comment:
   Because this workflow uses `github.token` to add the label, the resulting 
`pull_request:labeled` event is suppressed from starting another Actions 
workflow. The check workflow therefore keeps evaluating the original event 
payload (which has no `port-done`) and remains failed even after the label is 
added. Use a token/event path that can trigger the check, or make the check 
read the current labels after the Dependabot labeling step.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to