File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 5
5
use crate :: {
6
6
config:: ShortcutConfig ,
7
7
db:: issue_data:: IssueData ,
8
- github:: { AuthorAssociation , Event , Label } ,
8
+ github:: { Event , Label } ,
9
9
handlers:: Context ,
10
10
interactions:: ErrorComment ,
11
11
} ;
12
+ use octocrab:: models:: AuthorAssociation ;
12
13
use parser:: command:: shortcut:: ShortcutCommand ;
13
14
14
15
/// Key for the state in the database
@@ -65,7 +66,16 @@ pub(super) async fn handle_command(
65
66
}
66
67
67
68
// We add a small reminder for the author to use `@bot ready` when ready
68
- if matches ! ( input, ShortcutCommand :: Author ) {
69
+ //
70
+ // Except if the author is a member (or the owner) of the repository, as
71
+ // the author should already know about the `ready` command and already
72
+ // have the required permissions to update the labels manually anyway.
73
+ if matches ! ( input, ShortcutCommand :: Author )
74
+ && !matches ! (
75
+ issue. author_association,
76
+ AuthorAssociation :: Member | AuthorAssociation :: Owner
77
+ )
78
+ {
69
79
// Get the state of the author reminder for this PR
70
80
let mut db = ctx. db . get ( ) . await ;
71
81
let mut state: IssueData < ' _ , AuthorReminderState > =
You can’t perform that action at this time.
0 commit comments