Skip to content

Commit 6265ac1

Browse files
Update dependabot-merger.yml
1 parent 06a5658 commit 6265ac1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/dependabot-merger.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,19 @@ jobs:
5151
PR_LIST=$(gh pr list --json number,headRefName --jq '.[] | "\(.number) \(.headRefName)"' | grep dependabot)
5252
PR_LIST=$(echo "$PR_LIST" | tr -d '\r') # Remove trailing newline
5353
echo "::set-output name=numbers::$PR_LIST"
54+
PR_LINKS=""
5455
while IFS= read -r line; do
5556
IFS=' ' read -r PR_NUMBER BRANCH_NAME <<< "$line"
57+
PR_URL="https://github.com/${GITHUB_REPOSITORY}/pull/$PR_NUMBER"
58+
PR_LINKS+="\n• <$PR_URL|#${PR_NUMBER}: ${BRANCH_NAME}>"
5659
echo "Merging PR #$PR_NUMBER from branch $BRANCH_NAME into $NEW_BRANCH..."
5760
git fetch origin $BRANCH_NAME
5861
git merge --no-commit --allow-unrelated-histories --strategy-option=theirs origin/$BRANCH_NAME
5962
echo "Pushing changes to $NEW_BRANCH..."
6063
git commit -m "Merged PR #$PR_NUMBER into $NEW_BRANCH"
6164
git push origin $NEW_BRANCH
6265
done <<< "$PR_LIST"
66+
echo "::set-output name=pr_links::$PR_LINKS"
6367
6468
- name: Merge process status
6569
run: |
@@ -72,7 +76,7 @@ jobs:
7276
channel-id: 'C04E69NEDAT'
7377
payload: |
7478
{
75-
"blocks": [
79+
"blocks": [
7680
{
7781
"type": "header",
7882
"text": {
@@ -90,6 +94,13 @@ jobs:
9094
"type": "mrkdwn",
9195
"text": "*Testing Branch: *<https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/tree/dependabot-test-${{ steps.datetime.outputs.date }}|dependabot-test-${{ steps.datetime.outputs.date }}>"
9296
}
97+
},
98+
{
99+
"type": "section",
100+
"text": {
101+
"type": "mrkdwn",
102+
"text": "'${{ steps.merge_prs.outputs.pr_links }}'"
103+
}
93104
}
94105
]
95106
}

0 commit comments

Comments
 (0)