File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use octocrab::params::State;
99
1010// allowed operations for github issue interactions
1111#[ non_exhaustive]
12- #[ derive( Copy , Clone ) ]
12+ #[ derive( Copy , Clone , Debug ) ]
1313pub ( super ) enum Action {
1414 Create ,
1515 List ,
@@ -18,15 +18,8 @@ pub(super) enum Action {
1818}
1919
2020impl From < Action > for String {
21- #[ allow( unreachable_patterns) ]
2221 fn from ( action : Action ) -> Self {
23- match action {
24- Action :: Create => String :: from ( "Create" ) ,
25- Action :: List => String :: from ( "List" ) ,
26- Action :: Read => String :: from ( "Read" ) ,
27- Action :: Update => String :: from ( "Update" ) ,
28- _ => String :: from ( "Unknown" ) ,
29- }
22+ format ! ( "{action:?}" )
3023 }
3124}
3225
@@ -121,7 +114,7 @@ impl<'issue> Issue<'issue> {
121114 Some ( pat) => octocrab:: Octocrab :: builder ( )
122115 . personal_token ( pat. to_string ( ) )
123116 . build ( )
124- . unwrap_or ( {
117+ . unwrap_or_else ( |_| {
125118 log:: warn!( "could not authenticate client with Personal Access Token" ) ;
126119 log:: warn!( "will continue with unauthenticated client" ) ;
127120 octocrab:: Octocrab :: default ( )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ impl concourse_resource::Resource for GithubIssue {
3333
3434 if source. owner ( ) . is_empty ( ) || source. repo ( ) . is_empty ( ) {
3535 panic ! (
36- "both 'owner' and 'repo' are required parameters for the Github Issue Resource 'source'"
36+ "both 'owner' and 'repo' are required parameters for the Github Issue resource 'source'"
3737 ) ;
3838 }
3939
You can’t perform that action at this time.
0 commit comments