Skip to content

Commit

Permalink
parse PR number (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
lobkovilya committed Jan 6, 2025
1 parent cd17373 commit 5915ad5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr-merged-updated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
repo: context.repo.repo,
ref: process.env.GITHUB_SHA
});
pr = commit.data.commit.message;
const prMatch = commit.data.commit.message.match(/\(#(\d+)\)/);
pr = prMatch ? parseInt(prMatch[1]) : undefined;
}
console.log('Branch:', branch);
console.log('PR:', pr);

0 comments on commit 5915ad5

Please sign in to comment.