Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/create-issue-for-unreferenced-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ jobs:
return;
}
// Bail if this edit was made by the GitHub Actions bot (this workflow)
// This prevents infinite loops when we update the PR body with the new issue reference
// We check login specifically to not skip edits from other legitimate bots
if (context.payload.sender && context.payload.sender.login === 'github-actions[bot]') {
console.log(`PR #${pr.number} was edited by github-actions[bot] (this workflow), skipping.`);
return;
}
// Check if the PR is already approved
const reviewsResponse = await github.rest.pulls.listReviews({
owner: context.repo.owner,
Expand Down Expand Up @@ -109,7 +117,7 @@ jobs:
console.log(`Created issue #${issueID}.`);
// Update the PR body to reference the new issue
const updatedPrBody = `${prBody}\n\nCloses #${issueID}`;
const updatedPrBody = `${prBody}\n\nCloses #${issueID} (added automatically)`;
await github.rest.pulls.update({
owner: context.repo.owner,
Expand Down
Loading