tagpr icon indicating copy to clipboard operation
tagpr copied to clipboard

[Question] How to get version information when executing tagpr.command

Open k2tzumi opened this issue 1 year ago • 1 comments

When tagpr generates a PullRequest for a release, is it possible to get the following information from the shell specified in the commnad?

  • Next version number
  • Current version number

The reason for wanting to get the version number is that, apart from CHANGELOG, we want to automatically output the changes in the OpenAPI specification between release versions

I performed the following verification in the shell of tagpr.command, but could not get the version information.

  • Checked for version information in environment variables.
  • I guessed the version information from the information in event.json( $GITHUB_EVENT_PATH )
  • I used the gh command to get the latest version. 
    I could check the version of latest, but the next version has to be calculated, but I can't determine if it is major, minor, or patch
  • Extract from the version listed in CHANGELOG.md The tagpr.command cannot identify this version because the execution is done before the CHANGELOG.md is updated.

If we can get the version in tagpr.command, we can update multiple versions of the following Issue. https://github.com/Songmu/tagpr/issues/152

k2tzumi avatar Dec 12 '23 12:12 k2tzumi

@Songmu

I have read the tagpr source and feel that it is not possible to get the version information from the shell specified in the commnad. This is a suggestion for improvement, but which of the following suggestions would be preferable?

  • Set environment variables so that version information can be referenced when commnad is executed.
  • The timing when commnad is executed should be after the updated CHANGELOG.md is committed. Add post-command separately from existing commnad, considering the impact on existing commnad.

Personally, I would recommend the first option as it has a limited scope of modification and less impact.

k2tzumi avatar Dec 29 '23 08:12 k2tzumi