@@ -23,12 +23,12 @@ jobs:
2323 # Get all tags sorted by version
2424 CURRENT_TAG="${{ github.event.release.tag_name }}"
2525 PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -A 1 "^${CURRENT_TAG}$" | tail -n 1)
26-
26+
2727 # If there's no previous tag, use the first commit
2828 if [ -z "$PREVIOUS_TAG" ] || [ "$PREVIOUS_TAG" = "$CURRENT_TAG" ]; then
2929 PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD)
3030 fi
31-
31+
3232 echo "previous_tag=${PREVIOUS_TAG}" >> $GITHUB_OUTPUT
3333 echo "Found previous tag/commit: ${PREVIOUS_TAG}"
3434
@@ -39,24 +39,24 @@ jobs:
3939 script : |
4040 const currentTag = '${{ github.event.release.tag_name }}';
4141 const previousTag = '${{ steps.previous_tag.outputs.previous_tag }}';
42-
42+
4343 console.log(`Finding PRs between ${previousTag} and ${currentTag}`);
44-
44+
4545 // Get commits between previous and current release
4646 const comparison = await github.rest.repos.compareCommits({
4747 owner: context.repo.owner,
4848 repo: context.repo.repo,
4949 base: previousTag,
5050 head: currentTag
5151 });
52-
52+
5353 const commits = comparison.data.commits;
5454 console.log(`Found ${commits.length} commits`);
55-
55+
5656 // Extract PR numbers from commit messages
5757 const prNumbers = new Set();
5858 const prPattern = /#(\d+)/g;
59-
59+
6060 for (const commit of commits) {
6161 const message = commit.commit.message;
6262 const matches = message.matchAll(prPattern);
@@ -74,10 +74,10 @@ jobs:
7474 }
7575 }
7676 }
77-
77+
7878 // Verify these are actually PRs (not issues)
7979 const validPRs = [];
80-
80+
8181 for (const prNumber of prNumbers) {
8282 try {
8383 const { data: pr } = await github.rest.pulls.get({
9595 console.log(`#${prNumber} is not a valid PR or was not found`);
9696 }
9797 }
98-
98+
9999 console.log(`Found ${validPRs.length} valid merged PRs`);
100100 return validPRs;
101101
@@ -106,9 +106,9 @@ jobs:
106106 const prNumbers = ${{ steps.get_prs.outputs.result }};
107107 const releaseTag = '${{ github.event.release.tag_name }}';
108108 const releaseUrl = '${{ github.event.release.html_url }}';
109-
109+
110110 const comment = `🎉 This pull request is included in [${releaseTag}](${releaseUrl})!`;
111-
111+
112112 for (const prNumber of prNumbers) {
113113 try {
114114 await github.rest.issues.createComment({
@@ -122,5 +122,5 @@ jobs:
122122 console.error(`Failed to comment on PR #${prNumber}:`, error.message);
123123 }
124124 }
125-
125+
126126 console.log(`Commented on ${prNumbers.length} PRs`);
0 commit comments