Skip to content

Commit e2ebb7b

Browse files
authored
Merge pull request #1959 from Urgau/issue-links-ignore-github-commits
Also ignore GitHub merge commits when checking issue links in commits
2 parents 527bf21 + dd70fcb commit e2ebb7b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/handlers/check_commits/issue_links.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::{config::IssueLinksConfig, github::GithubCommit};
77
static LINKED_RE: LazyLock<Regex> =
88
LazyLock::new(|| Regex::new(r"\B([a-zA-Z-_]+/[a-zA-Z-_]+)?(#[0-9]+)\b").unwrap());
99

10-
const MERGE_IGNORE_LIST: [&str; 2] = ["Rollup merge of ", "Auto merge of "];
10+
const MERGE_IGNORE_LIST: [&str; 3] = ["Rollup merge of ", "Auto merge of ", "Merge pull request "];
1111

1212
pub(super) fn issue_links_in_commits(
1313
_conf: &IssueLinksConfig,
@@ -56,6 +56,10 @@ fn test_mentions_in_commits() {
5656
"8009423d53d30b56d8cf0fec08f9852329a1a9a4",
5757
"Auto merge of #123\n\nWe ignore the issue link for Auto merge of",
5858
));
59+
commits.push(dummy_commit_from_body(
60+
"1eeacf822f6c11cd10713ddcb54a72352cacb2c2",
61+
"Merge pull request #2236 from rust-lang/rustc-pull",
62+
));
5963

6064
assert_eq!(issue_links_in_commits(&config, &commits), None);
6165

0 commit comments

Comments
 (0)