Skip to content
11 changes: 9 additions & 2 deletions .github/scripts/bot-pr-missing-linked-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ module.exports = async ({ github, context }) => {
prData = prResponse.data;
}

const authorType = prData.user?.type;
const authorLogin = prData.user?.login;

if (authorType === "Bot" || authorLogin?.endsWith('[bot]')){
console.log(`Skipping comment: PR created by bot (${authorLogin})`);
return;
}

const body = prData.body || "";
const regex = /\bFixes\s*:?\s*(#\d+)(\s*,\s*#\d+)*/i;

Expand Down Expand Up @@ -81,5 +89,4 @@ module.exports = async ({ github, context }) => {
console.error('Repository:', `${context.repo.owner}/${context.repo.repo}`);
throw error;
}
};

};
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
- Fixed `cron-check-broken-links.yml` string parsing issue in context input `dry_run` (#1235)
- Flaky tests by disabling TLS in mock Hedera nodes in `mock_server.py`
- Fixed LinkBot permission issue for fork PRs by changing trigger to pull_request_target and adding proper permissions.
- Fixed bot-pr-missing-linked-issue to skip commenting on pull requests created by automated bots. (#1382)

### Breaking Change

Expand Down
Loading