Skip to content

Commit

Permalink
fix: can now pick no coauthors
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanlogue committed Nov 6, 2023
1 parent aa070df commit 4b38eac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Ability to pick no coauthors

## [v0.1.0](https://github.com/stefanlogue/meteor/releases/tag/v0.1.0) - 2023-11-05
### Added
Expand Down
3 changes: 3 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func convertCoauthors(coauthors []coauthor) []list.Item {
if len(items) == 0 {
return nil
}
items = append(items, coauthor{})
copy(items[1:], items)
items[0] = coauthor{"None", "no coauthors", false}
return items
}

Expand Down
3 changes: 3 additions & 0 deletions tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ func buildCoauthorsString(coauthors []coauthor) string {
`
for _, coauthor := range coauthors {
if coauthor.Selected {
if coauthor.Name == "None" {
return ""
}
s += fmt.Sprintf("\nCo-authored-by: %s <%s>", coauthor.Name, coauthor.Email)
}
}
Expand Down

0 comments on commit 4b38eac

Please sign in to comment.