// UpdateChangelog generates a new CHANGELOG entry for the given release. If pending is true, the contents of
// CHANGELOG_PENDING.md will be replaced with the new entry. Otherwise, the entry will be prepended to CHANGELOG.md.
UpdateChangelog generates a new CHANGELOG entry for the given release. If pending is true, the contents of
CHANGELOG_PENDING.md will be replaced with the new entry. Otherwise, the entry will be prepended to CHANGELOG.md.
// UpdateChangelog generates a new CHANGELOG entry for the given release . If pending is true the contents of // CHANGELOG_PENDING . md will be replaced with the new entry . Otherwise the entry will be prepended to CHANGELOG . md .
func (r *Repository) UpdateChangelog(release *Release, pending bool) error {
	entry, err := release.RenderChangelog()
	if err != nil {
		return err
	}
	return util.WriteFile([]byte(entry), filepath.Join(r.RootPath, "CHANGELOG.md"), !pending)
}
func ( r * Repository ) UpdateChangelog ( release * Release , pending bool ) error { entry , err := release . RenderChangelog ( ) if err != nil { return err } return util . WriteFile ( [ ] byte ( entry ) , filepath . Join ( r . RootPath , " " ) , ! pending ) }
UpdateChangelog generates a new CHANGELOG entry for the given release.
UpdateChangelog generates a new CHANGELOG entry for the given release .