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

Implement "author" command argument for diffChangelog command #3990

Merged

Conversation

vitaliyg2
Copy link
Contributor

@vitaliyg2 vitaliyg2 commented Mar 21, 2023

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Currently there is no way to specify changesets author for changesets generated by the diffChangelog command.
This implements support of the author command argument for the diffChangelog command, same way as it's implemented for the generateChangelog command.

This allows to specify author for diffChangelog in properties file or from the command line, also implemented changeSetAuthor property for Maven plugin (same way as it is implemented for generateChangelog command).

Fixes #1610

Things to be aware of

Implementation is based on the generateChangelog command.

@nvoxland
Copy link
Contributor

Initial/Pre-Review Thoughts

Changes make sense to me. Thanks!

Questions I have:

  • None

Potential risks:

  • None

What could make the full review difficult:

  • Nothing

@kevin-atx kevin-atx added TypeEnhancement RiskLow Trivial changes in spelling, documentation changes, focused bug fixes, etc. labels Mar 28, 2023
@filipelautert filipelautert self-assigned this Apr 10, 2023
@filipelautert filipelautert added sprint2023-48 SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Apr 10, 2023
…ffChangelog

# Conflicts:
#	liquibase-core/src/main/java/liquibase/command/core/DiffChangelogCommandStep.java
@filipelautert filipelautert added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Apr 10, 2023
@filipelautert
Copy link
Collaborator

Hello @vitaliyg2 , thanks for the improvement!
I fixed the current tests, but do you think you could add a new test for this change at diffChangelog.test.groovy ?

@vitaliyg2
Copy link
Contributor Author

Hi @filipelautert,
I'm not sure if it worth creating new test for this (it will be practically identical copy of the existing test) , for now I just updated one of the existing tests to also check for if author argument is working correctly.

@filipelautert filipelautert added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Apr 11, 2023
Copy link
Collaborator

@filipelautert filipelautert left a comment

Choose a reason for hiding this comment

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

Thanks @vitaliyg2 , Adding the parameter to a test seems enough.

@filipelautert filipelautert added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels Apr 20, 2023
Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

The author property for generate-changelog is hidden from the help. Given that we're expanding the usage of author to diff-changelog, the author property should be visible in help for both commands.

A quick test did verify that despite not appearing in the help, generate-changelog accepts and uses the author property.

CHANGES REQUESTED

@filipelautert
Copy link
Collaborator

Thanks @vitaliyg2 for unhiding author field for generate-changelog!

@filipelautert filipelautert added SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions and removed SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions labels May 15, 2023
@XDelphiGrl
Copy link
Contributor

Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

Did you ever wish you could generate a changelog or diff-changelog and specify an author name, instead of relying on the autogenerated author name? Now you can! This PR introduces a new diff-changelog command property author that Liquibase uses to popluate the author attribute on generated changesets. Generate-changelog already implemented the author command property, but it was hidden from the help. The property is now correctly documented in the CLI help for both diff-changelog and generate-changelog.

  • Integration tests expanded to validate the new functionality.
  • Light manual testing of diff-changelog --author customAuth for all changelog formats passing.
  • Test harness failures are unrelated to this PR and can be disregarded.
  • Functional tests passing.

APPROVED

@filipelautert filipelautert added this to the 1NEXT milestone May 17, 2023
@filipelautert filipelautert merged commit 8b6f7cc into liquibase:master May 17, 2023
31 of 34 checks passed
@unlimitedsola
Copy link

unlimitedsola commented May 17, 2023

Hi All, big thanks for adding this feature ❤️. In my original feature request, I only mentioned that the author was missing as an argument for the generated changelogs, but I can see supporting the context option could also be a useful addition too. Would you mind if I follow the steps of this PR and also add the support for context?

@filipelautert
Copy link
Collaborator

Hello @unlimitedsola ! Sure, please feel free to create a new pr. The more features the merrier :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RiskLow Trivial changes in spelling, documentation changes, focused bug fixes, etc. SafeToBuild Indicates that a particular PR contains changes which are safe to build using GitHub actions sprint2023-48 TypeEnhancement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

diffChangelog command is not respecting the changeSetAuthor option
7 participants