diff options
| -rw-r--r-- | src/bin/git_remote_nostr/list.rs | 6 | ||||
| -rw-r--r-- | tests/git_remote_nostr/list.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs index e6a4680..af71674 100644 --- a/src/bin/git_remote_nostr/list.rs +++ b/src/bin/git_remote_nostr/list.rs | |||
| @@ -84,7 +84,7 @@ pub async fn run_list( | |||
| 84 | ); | 84 | ); |
| 85 | 85 | ||
| 86 | state.extend( | 86 | state.extend( |
| 87 | // get as refs/pr/<branch-name>(<shorthand-event-id>) and refs/pr-by-id/<event-id> | 87 | // get as refs/pr/<branch-name>(<shorthand-event-id>) and refs/pr/<event-id>/head |
| 88 | get_all_proposals_state(git_repo, repo_ref).await?, | 88 | get_all_proposals_state(git_repo, repo_ref).await?, |
| 89 | ); | 89 | ); |
| 90 | 90 | ||
| @@ -240,13 +240,13 @@ async fn get_all_proposals_state( | |||
| 240 | { | 240 | { |
| 241 | if let Ok(tip) = tag_value(pr_or_pr_update, "c") { | 241 | if let Ok(tip) = tag_value(pr_or_pr_update, "c") { |
| 242 | state.insert(format!("refs/{branch_name}"), tip.clone()); | 242 | state.insert(format!("refs/{branch_name}"), tip.clone()); |
| 243 | state.insert(format!("refs/pr-by-id/{}", proposal.id), tip); | 243 | state.insert(format!("refs/pr/{}/head", proposal.id), tip); |
| 244 | } | 244 | } |
| 245 | } else if let Ok(tip) = | 245 | } else if let Ok(tip) = |
| 246 | make_commits_for_proposal(git_repo, repo_ref, &events_to_apply) | 246 | make_commits_for_proposal(git_repo, repo_ref, &events_to_apply) |
| 247 | { | 247 | { |
| 248 | state.insert(format!("refs/{branch_name}"), tip.clone()); | 248 | state.insert(format!("refs/{branch_name}"), tip.clone()); |
| 249 | state.insert(format!("refs/pr-by-id/{}", proposal.id), tip); | 249 | state.insert(format!("refs/pr/{}/head", proposal.id), tip); |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
diff --git a/tests/git_remote_nostr/list.rs b/tests/git_remote_nostr/list.rs index 50ea350..1972cd5 100644 --- a/tests/git_remote_nostr/list.rs +++ b/tests/git_remote_nostr/list.rs | |||
| @@ -328,7 +328,7 @@ mod with_state_announcement { | |||
| 328 | pr_refs.push(format!("{tip} refs/heads/{branch_name}")); | 328 | pr_refs.push(format!("{tip} refs/heads/{branch_name}")); |
| 329 | pr_refs.push(format!("{tip} refs/{branch_name}")); | 329 | pr_refs.push(format!("{tip} refs/{branch_name}")); |
| 330 | let proposal_id = get_proposal_id_from_branch_name(&r55.events, name)?; | 330 | let proposal_id = get_proposal_id_from_branch_name(&r55.events, name)?; |
| 331 | pr_refs.push(format!("{tip} refs/pr-by-id/{proposal_id}")); | 331 | pr_refs.push(format!("{tip} refs/pr/{proposal_id}/head")); |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | assert_eq!( | 334 | assert_eq!( |