upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-09-03 16:57:14 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-09-03 16:57:14 +0100
commit4bd46c3cf7bacb062d45d3c99d3edfadc95cb139 (patch)
tree9f2a0e9eb51376d892a4423a13491d6b84f9649d /src
parentf9af579148f1cbf8f062c8172535f33a0ca99934 (diff)
fix(remote): `refs/pr-by-id/*` ~> `refs/pr/*/head`
to align more closely with githubs `refs/pull/*/head` we can pretend that pr means both Patch Request and Pull Request
Diffstat (limited to 'src')
-rw-r--r--src/bin/git_remote_nostr/list.rs6
1 files changed, 3 insertions, 3 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 }