@@ -465,7 +465,10 @@ pub(crate) struct RenderedLinkConfig {
465
465
#[ derive( PartialEq , Eq , Debug , serde:: Deserialize ) ]
466
466
#[ serde( rename_all = "kebab-case" ) ]
467
467
#[ serde( deny_unknown_fields) ]
468
- pub ( crate ) struct IssueLinksConfig { }
468
+ pub ( crate ) struct IssueLinksConfig {
469
+ #[ serde( default = "default_true" ) ]
470
+ pub ( crate ) check_commits : bool ,
471
+ }
469
472
470
473
#[ derive( PartialEq , Eq , Debug , serde:: Deserialize ) ]
471
474
#[ serde( rename_all = "kebab-case" ) ]
@@ -482,6 +485,11 @@ pub(crate) struct BehindUpstreamConfig {
482
485
pub ( crate ) days_threshold : Option < usize > ,
483
486
}
484
487
488
+ #[ inline]
489
+ fn default_true ( ) -> bool {
490
+ true
491
+ }
492
+
485
493
fn get_cached_config ( repo : & str ) -> Option < Result < Arc < Config > , ConfigurationError > > {
486
494
let cache = CONFIG_CACHE . read ( ) . unwrap ( ) ;
487
495
cache. get ( repo) . and_then ( |( config, fetch_time) | {
@@ -603,7 +611,7 @@ mod tests {
603
611
604
612
[shortcut]
605
613
606
- [canonicalize- issue-links]
614
+ [issue-links]
607
615
608
616
[rendered-link]
609
617
trigger-files = ["posts/"]
@@ -674,7 +682,9 @@ mod tests {
674
682
rendered_link: Some ( RenderedLinkConfig {
675
683
trigger_files: vec![ "posts/" . to_string( ) ]
676
684
} ) ,
677
- issue_links: Some ( IssueLinksConfig { } ) ,
685
+ issue_links: Some ( IssueLinksConfig {
686
+ check_commits: true ,
687
+ } ) ,
678
688
no_mentions: Some ( NoMentionsConfig { } ) ,
679
689
behind_upstream: Some ( BehindUpstreamConfig {
680
690
days_threshold: Some ( 14 ) ,
@@ -697,7 +707,8 @@ mod tests {
697
707
title = "[stable"
698
708
branch = "stable"
699
709
700
- [canonicalize-issue-links]
710
+ [issue-links]
711
+ check-commits = false
701
712
702
713
[behind-upstream]
703
714
days-threshold = 7
@@ -747,7 +758,9 @@ mod tests {
747
758
merge_conflicts: None ,
748
759
bot_pull_requests: None ,
749
760
rendered_link: None ,
750
- issue_links: Some ( IssueLinksConfig { } ) ,
761
+ issue_links: Some ( IssueLinksConfig {
762
+ check_commits: false ,
763
+ } ) ,
751
764
no_mentions: None ,
752
765
behind_upstream: Some ( BehindUpstreamConfig {
753
766
days_threshold: Some ( 7 ) ,
0 commit comments