Skip to content

Commit

Permalink
Automatically set delete_branch_on_merge for repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Mar 1, 2024
1 parent 5cb6632 commit ed66d6c
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit ed66d6c

Please sign in to comment.