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

Add ability to open generated changelog for editing. #8

Merged
merged 3 commits into from
Mar 10, 2020

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Mar 9, 2020

Introduces a new option to be specified: launchEditor. When specified, release-it-lerna-changelog will generate the changelog with lerna-changelog (just like it has always done) then launch the configured editor with a temporary file. This allows the person doing the release to customize the changelog before continuing.

There are a few valid values for launchEditor:

  • false - Disables the feature.
  • true - The process.env.EDITOR value will be used
  • any string - This string will be used as if it were a command. In order to interpolate the temporary file path in the string, you can use ${file} in your configuration.

@rwjblue rwjblue added the enhancement New feature or request label Mar 9, 2020
Introduces a new option to be specified: `launchEditor`. When specified,
`release-it-lerna-changelog` will generate the changelog with
`lerna-changelog` (just like it has always done) then launch the
configured editor with a temporary file. This allows the person doing
the release to customize the changelog before continuing.

There are a few valid values for `launchEditor`:

* `false` - Disables the feature.
* `true` - The `process.env.EDITOR` value will be used
* any string - This string will be used as if it were a command. In
  order to interpolate the temporary file path in the string, you can
  use `${file}` in your configuration.
@rwjblue rwjblue force-pushed the add-option-to-open-changelog branch from a409559 to 7dda95d Compare March 9, 2020 22:04
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
* Add nice error when `$EDITOR` is not set properly, but `launchEditor:
  true` is specified.
* Refactor README documentation of options to make it clearer what is
  allowed
* Force `ava` to run serially (without this the tests run in parallel
  and mutate `process.env` causing failures dependent on timing).
* Update `_execLernaChangelog` signature to be less nuts
@rwjblue
Copy link
Collaborator Author

rwjblue commented Mar 10, 2020

Awesome points, thank you for reviewing! I've updated to address...

Copy link

@hjdivad hjdivad left a comment

Choose a reason for hiding this comment

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

❤️

@rwjblue rwjblue merged commit bebf0c3 into master Mar 10, 2020
@rwjblue rwjblue deleted the add-option-to-open-changelog branch March 10, 2020 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants