Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Automatically set delete_branch_on_merge for repositories #72

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/github/api/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ impl GitHubWrite {
description: &'a str,
homepage: &'a Option<String>,
auto_init: bool,
delete_branch_on_merge: bool,
}
let req = &Req {
name,
description,
homepage,
auto_init: true,
delete_branch_on_merge: true,
};
debug!("Creating the repo {org}/{name} with {req:?}");
if self.dry_run {
Expand Down Expand Up @@ -254,10 +256,12 @@ impl GitHubWrite {
struct Req<'a> {
description: &'a Option<String>,
homepage: &'a Option<String>,
delete_branch_on_merge: bool,
}
let req = Req {
description,
homepage,
delete_branch_on_merge: true,
};
debug!("Editing repo {}/{} with {:?}", org, repo_name, req);
if !self.dry_run {
Expand Down