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

[ISSUE]: gitrealeasemanager/create does not include targetcommitish and inputFilePath parameters #1432

Closed
2 tasks done
TaffarelJr opened this issue Jan 8, 2025 · 4 comments · Fixed by #1433
Closed
2 tasks done
Labels
bug Something isn't working
Milestone

Comments

@TaffarelJr
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitHub Actions

What are you seeing?

When using the gitreleasemanager/create action, there are parameters defined for targetcommitish and inputFilePath; however, upon execution, those parameters are not included in the command line sent to dotnet-gitreleasemanager.

Sample GitHub Action:

- uses: gittools/actions/gitreleasemanager/create@v3
  with:
    owner: ${{ github.repository_owner }}
    token: ${{ secrets.GITHUB_TOKEN }}
    repository: my-repo
    targetDirectory: ${{ github.workspace }}
    targetcommitish: ${{ github.sha }}              # <-- property is valid
    name: v${{ steps.gitversion.outputs.semVer }}
    inputFilePath: ReleaseNotes.md                  # <-- property is valid

Command-line generated from the above Action (wrapped for readability):

/opt/hostedtoolcache/GitReleaseManager.Tool/0.18.0/dotnet-gitreleasemanager create
  --owner my-org
  --token ***
  --repository my-repo
  --targetDirectory /home/runner/work/my-repo/my-repo
  --name v1.2.3

( --targetcommitish and --inputFilePath command-line parameters left out)

What is expected?

--targetcommitish and --inputFilePath command-line parameters should be included, as specified in the Action:

/opt/hostedtoolcache/GitReleaseManager.Tool/0.18.0/dotnet-gitreleasemanager create
  --owner my-org
  --token ***
  --repository my-repo
  --targetDirectory /home/runner/work/my-repo/my-repo
  --targetcommitish edf8f64259dca665f01c1da5fff9650b7e342b69
  --name v1.2.3
  --inputFilePath ReelaseNotes.md

Steps to Reproduce

Include the targetcommitish and inputFilePath parameters in a GitHub Action,
and observe the corresponding --targetcommitish and --inputFilePath command-line parameters are not generated.

Output log or link to your CI build (if appropriate).

@TaffarelJr
Copy link
Author

The workaround to this issue, of course, is to just call the command-line manually in the workflow instead of using the Action. This is currently working for me:

- run: >
    $RUNNER_TOOL_CACHE/GitReleaseManager.Tool/0.18.0/dotnet-gitreleasemanager create
    --owner ${{ github.repository_owner }}
    --token ${{ secrets.GITHUB_TOKEN }}
    --repository my-repo
    --targetDirectory ${{ github.workspace }}
    --targetcommitish ${{ github.sha }}
    --name v${{ steps.gitversion.outputs.semVer }}
    --inputFilePath ReleaseNotes.md

@arturcic
Copy link
Member

arturcic commented Jan 8, 2025

@TaffarelJr you are right. Are you in a position to create a PR?
some refs:

Settings:

inputFileName: string


const inputFileName = this.buildAgent.getInput<CreateSettings>('inputFileName')

const commit = this.buildAgent.getInput<CreateSettings>('commit')

Inputs:




"name": "targetcommitish",

Tests:


inputFileName: 'inputFileName',

inputFileName: 'inputFileName',

@arturcic
Copy link
Member

arturcic commented Jan 8, 2025

please use inputFilePath and targetcommitish everywhere where necessary

arturcic added a commit to arturcic/gittools-actions that referenced this issue Jan 9, 2025
@arturcic arturcic added this to the v3.1.2 milestone Jan 9, 2025
arturcic added a commit that referenced this issue Jan 9, 2025
#1432 - fix inconsistent arguments for GRM create
@arturcic arturcic added the bug Something isn't working label Jan 14, 2025
@gittools-bot
Copy link

🎉 This issue has been resolved in version v3.1.2 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

@arturcic arturcic modified the milestones: v3.1.2, v3.1.3 Jan 14, 2025
@arturcic arturcic modified the milestones: v3.1.3, v3.1.4 Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants