Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Usage generation failing - action name missing #171

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

Closed
fty4 opened this issue Aug 11, 2022 · 2 comments · Fixed by #173
Closed

Usage generation failing - action name missing #171

fty4 opened this issue Aug 11, 2022 · 2 comments · Fixed by #173

Comments

@fty4
Copy link
Contributor

fty4 commented Aug 11, 2022

Wehn using the latest version v1.2.7 the usage generation is not correct.

The Action name is missing in the generated output:

- uses: /@main

expected:

- uses: bitflight-devops/github-action-readme-generator@main

But the repositoryFinder identifies the repo correctly:

[INFO ] ✨: repositoryFinder using GITHUB_REPOSITORY bitflight-devops/github-action-readme-generator and returns {"owner":"bitflight-devops","repo":"github-action-readme-generator"}

@fty4
Copy link
Contributor Author

fty4 commented Aug 11, 2022

The default values are not returned when receiving them here:

const actionName = `${inputs.config.get('owner') as string}/${inputs.config.get('repo')}`;

Currently the repositoryFinder details are set as defaults:

this.config.defaults({
save: true,
owner: repositoryDetail?.owner,
repo: repositoryDetail?.repo,

But when setting them via .set() the Action returns the correct value:
taskmedia@0615ab1#diff-c3c567b21087dae7a4ca80ba1e1ae752c2c7c2df8d12fd515a73182d1a83847bR159-R160

@fty4
Copy link
Contributor Author

fty4 commented Aug 11, 2022

Finally I found what really was the issue here:

The GitHub Action returns empty input strings via e.g. env INPUT_REPO.
This value will then be set inside the inputs configuration.

When checking if the value is empty before setting it the problem is solved.

See PR: #173

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 a pull request may close this issue.

1 participant