File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -79,26 +79,6 @@ impl Owner {
7979 }
8080 }
8181
82- /// Finds the owner by name. Never recreates a team, to ensure that
83- /// organizations that were deleted after they were added can still be
84- /// removed.
85- ///
86- /// May be a user's GH login or a full team name. This is case
87- /// sensitive.
88- pub fn find_by_login ( conn : & mut impl Conn , name : & str ) -> AppResult < Owner > {
89- if name. contains ( ':' ) {
90- Team :: find_by_login ( conn, name)
91- . optional ( ) ?
92- . map ( Owner :: Team )
93- . ok_or_else ( || bad_request ( format_args ! ( "could not find team with login `{name}`" ) ) )
94- } else {
95- User :: find_by_login ( conn, name)
96- . optional ( ) ?
97- . map ( Owner :: User )
98- . ok_or_else ( || bad_request ( format_args ! ( "could not find user with login `{name}`" ) ) )
99- }
100- }
101-
10282 pub fn kind ( & self ) -> i32 {
10383 match self {
10484 Owner :: User ( _) => OwnerKind :: User as i32 ,
You can’t perform that action at this time.
0 commit comments