upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib/push.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-08-04 11:50:39 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-08-05 09:23:01 +0100
commitf48677bad3f3dabb80992806e0e4c8ad4d45c716 (patch)
tree9d63debff0b602a15df56008cc739c087fbe8b26 /src/lib/push.rs
parentf76fe63da5f2c2f85215e86c8ecc63eda7c93902 (diff)
feat(send): support PR and PR update events
send as a PR if the commit would make patches that are too big for nostr events. send as a PR update if the proposal is PR. send as a PR, revising a patch root, if patches would be too big. in tests `get_pretend_proposal_root_event` has to be a actual proposal with a tip, rather than just a cover letter, so we have replaced it.
Diffstat (limited to 'src/lib/push.rs')
-rw-r--r--src/lib/push.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/push.rs b/src/lib/push.rs
index 1c09555..bcd368b 100644
--- a/src/lib/push.rs
+++ b/src/lib/push.rs
@@ -321,12 +321,14 @@ impl<'a> PushReporter<'a> {
321 } 321 }
322} 322}
323 323
324#[allow(clippy::too_many_arguments)]
324pub async fn push_refs_and_generate_pr_or_pr_update_event( 325pub async fn push_refs_and_generate_pr_or_pr_update_event(
325 git_repo: &Repo, 326 git_repo: &Repo,
326 repo_ref: &RepoRef, 327 repo_ref: &RepoRef,
327 tip: &Sha1Hash, 328 tip: &Sha1Hash,
328 user_ref: &UserRef, 329 user_ref: &UserRef,
329 root_proposal: Option<&Event>, 330 root_proposal: Option<&Event>,
331 title_description_overide: &Option<(String, String)>,
330 signer: &Arc<dyn NostrSigner>, 332 signer: &Arc<dyn NostrSigner>,
331 term: &Term, 333 term: &Term,
332) -> Result<Vec<Event>> { 334) -> Result<Vec<Event>> {
@@ -348,6 +350,7 @@ pub async fn push_refs_and_generate_pr_or_pr_update_event(
348 repo_ref, 350 repo_ref,
349 &user_ref.public_key, 351 &user_ref.public_key,
350 root_proposal, 352 root_proposal,
353 title_description_overide,
351 tip, 354 tip,
352 &[clone_url], 355 &[clone_url],
353 &[], 356 &[],