@@ -40,7 +40,7 @@ pub(super) async fn handle(
40
40
log:: debug!( "loading the git tags" ) ;
41
41
let tags = load_paginated (
42
42
ctx,
43
- & format ! ( "repos/{}/git/matching-refs/tags" , event. repo( ) . full_name) ,
43
+ & format ! ( "/ repos/{}/git/matching-refs/tags" , event. repo( ) . full_name) ,
44
44
|git_ref : & GitRef | {
45
45
git_ref
46
46
. name
@@ -54,7 +54,7 @@ pub(super) async fn handle(
54
54
log:: debug!( "loading the existing releases" ) ;
55
55
let releases = load_paginated (
56
56
ctx,
57
- & format ! ( "repos/{}/releases" , event. repo( ) . full_name) ,
57
+ & format ! ( "/ repos/{}/releases" , event. repo( ) . full_name) ,
58
58
|release : & Release | release. tag_name . clone ( ) ,
59
59
)
60
60
. await ?;
@@ -85,7 +85,7 @@ pub(super) async fn handle(
85
85
let e: octocrab:: Result < serde_json:: Value > = ctx
86
86
. octocrab
87
87
. post (
88
- format ! ( "repos/{}/releases" , event. repo( ) . full_name) ,
88
+ format ! ( "/ repos/{}/releases" , event. repo( ) . full_name) ,
89
89
Some ( & serde_json:: json!( {
90
90
"tag_name" : tag,
91
91
"name" : expected_name,
@@ -141,15 +141,24 @@ where
141
141
R : Eq + PartialEq + std:: hash:: Hash ,
142
142
F : Fn ( & T ) -> R ,
143
143
{
144
- let mut current_page: Page < T > = ctx. octocrab . get :: < Page < T > , _ , ( ) > ( url, None ) . await ?;
144
+ let mut current_page: Page < T > = ctx
145
+ . octocrab
146
+ . get :: < Page < T > , _ , ( ) > ( url, None )
147
+ . await
148
+ . with_context ( || format ! ( "failed to load {url}" ) ) ?;
145
149
146
150
let mut items = current_page
147
151
. take_items ( )
148
152
. into_iter ( )
149
153
. map ( |val| ( key ( & val) , val) )
150
154
. collect :: < HashMap < R , T > > ( ) ;
151
155
152
- while let Some ( mut new_page) = ctx. octocrab . get_page :: < T > ( & current_page. next ) . await ? {
156
+ while let Some ( mut new_page) = ctx
157
+ . octocrab
158
+ . get_page :: < T > ( & current_page. next )
159
+ . await
160
+ . with_context ( || format ! ( "failed to load next page {:?}" , current_page. next) ) ?
161
+ {
153
162
items. extend (
154
163
new_page
155
164
. take_items ( )
0 commit comments