Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add flag to turn on or off creating/modifying CHANGELOG.md #86

Merged
merged 4 commits into from
Sep 6, 2022

Conversation

siketyan
Copy link
Contributor

@siketyan siketyan commented Sep 6, 2022

Since our project is not using CHANGELOG.md, creating or modifying them by tagpr is not needed for us. This pull request proposes to add a flag to turn on/off the feature by .tagpr configuration file for people who wants turn it off like us.

@Songmu
Copy link
Owner

Songmu commented Sep 6, 2022

Thank you. It is a good feature.

  • Unfortunately, the config loading is not automatic, so could you please update a "cfg.Reload" method?
  • In that case, although it is opinionated, I would like to make the writing of the changelog the default behavior, so if this configuration key is not present, could you please update the changelog?
    • So I would be happy if the .tagpr configuration file of this repository itself can be unmodified so as not to change the behavior (Please keep backward compatibility)

logs, _, err := gch.Changelogs(ctx, 20)
if err != nil {

if tp.cfg.changelog == nil || *tp.cfg.changelog {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Songmu If tagpr.changelog configuration is not defined, this condition will be evaluated to true, isn't it? So it does not change the current behaviour.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. You are right. So here's what you should do.

  • Update cfg.Reload
  • Keep .tagpr unchagend in this repository

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Songmu Reverted .tagpr at 81d0d9b.

@siketyan
Copy link
Contributor Author

siketyan commented Sep 6, 2022

@Songmu Updated cfg.Reload() function at 9024ef1.

@siketyan siketyan requested a review from Songmu September 6, 2022 05:18
@Songmu
Copy link
Owner

Songmu commented Sep 6, 2022

Great! Thank you.

@Songmu Songmu merged commit fabae17 into Songmu:main Sep 6, 2022
@siketyan siketyan deleted the feat/turn-off-changelog branch September 6, 2022 05:22
@Songmu Songmu mentioned this pull request Sep 6, 2022
@Songmu
Copy link
Owner

Songmu commented Sep 6, 2022

Released as v0.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants