File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 1
1
use anyhow:: Context ;
2
2
use axum:: async_trait;
3
- use base64:: Engine ;
4
3
use octocrab:: models:: { App , Repository , RunId } ;
5
4
use octocrab:: { Error , Octocrab } ;
6
5
use tracing:: log;
@@ -66,15 +65,12 @@ impl RepositoryClient for GithubRepositoryClient {
66
65
)
67
66
} ) ?;
68
67
69
- let engine = base64:: engine:: general_purpose:: STANDARD ;
70
68
response
71
69
. take_items ( )
72
70
. into_iter ( )
73
71
. next ( )
74
- . and_then ( |content| content. content )
72
+ . and_then ( |content| content. decoded_content ( ) )
75
73
. ok_or_else ( || anyhow:: anyhow!( "Configuration file not found" ) )
76
- . and_then ( |content| Ok ( engine. decode ( content. trim ( ) ) ?) )
77
- . and_then ( |content| Ok ( String :: from_utf8 ( content) ?) )
78
74
. and_then ( |content| {
79
75
let config: RepositoryConfig = toml:: from_str ( & content) . map_err ( |error| {
80
76
anyhow:: anyhow!( "Could not deserialize repository config: {error:?}" )
You can’t perform that action at this time.
0 commit comments