From fedf5166f0c57db14b9e43747121e4b7845b63dd Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 20 Aug 2024 06:25:17 +0100 Subject: feat: set proposal branch prefix to `pr/` from `prs/`. whilst plural reflects usage of `heads` and `tags` in git refs, singular is shorter and more reflective of usage of branch prefixes such as `feature/` `fix/` --- src/git_remote_helper.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/git_remote_helper.rs') diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs index 9b9b000..e55a2eb 100644 --- a/src/git_remote_helper.rs +++ b/src/git_remote_helper.rs @@ -233,7 +233,7 @@ async fn list( .clone() }; - state.retain(|k, _| !k.starts_with("refs/heads/prs/")); + state.retain(|k, _| !k.starts_with("refs/heads/pr/")); let open_proposals = get_open_proposals(git_repo, repo_ref).await?; let current_user = get_curent_user(git_repo)?; @@ -447,7 +447,7 @@ async fn fetch( let oids_from_git_servers = fetch_batch .iter() - .filter(|(refstr, _)| !refstr.contains("refs/heads/prs/")) + .filter(|(refstr, _)| !refstr.contains("refs/heads/pr/")) .map(|(_, oid)| oid.clone()) .collect::>(); @@ -488,7 +488,7 @@ async fn fetch( ); } - fetch_batch.retain(|refstr, _| refstr.contains("refs/heads/prs/")); + fetch_batch.retain(|refstr, _| refstr.contains("refs/heads/pr/")); if !fetch_batch.is_empty() { let open_proposals = get_open_proposals(git_repo, repo_ref).await?; @@ -580,13 +580,13 @@ async fn push( let proposal_refspecs = refspecs .iter() - .filter(|r| r.contains("refs/heads/prs/")) + .filter(|r| r.contains("refs/heads/pr/")) .cloned() .collect::>(); let mut git_server_refspecs = refspecs .iter() - .filter(|r| !r.contains("refs/heads/prs/")) + .filter(|r| !r.contains("refs/heads/pr/")) .cloned() .collect::>(); -- cgit v1.2.3