pozil / auto-assign-issue

GitHub Action that auto-assigns issues or PRs to one or more users
Creative Commons Zero v1.0 Universal
53 stars 32 forks source link

Enhancement the action to use variable for version number instead of hard coded version #22

Closed ajaydwarkani closed 2 years ago

ajaydwarkani commented 2 years ago

I use 100's of Git repo and changing the auto-assign-issue version (whenever there is an update) in all the repo's action workflow file is lot of work, it would be nice to use a variable instead of a fixed version. I have tried using variable and I get the below error.

Invalid workflow file
The workflow is not valid. .github/workflows/assign-issue.yml (Line: 12, Col: 15): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.AUTO_ASSIGN_ISSUE_VERSION

For Example: uses: pozil/auto-assign-issue@v1.2.0 can be specified as uses: pozil/auto-assign-issue@v${{ secrets.AUTO_ASSIGN_ISSUE_VERSION }}

pozil commented 2 years ago

Hi @ajaydwarkani, this issue is beyond the scope of the auto-assign-issue action. I don't think that using a dynamic expression as a version can be done because of the way GitHub Action expression/configuration works. Besides, storing the version in a secret would not be very helpful because as an admin you would not be able to read it from the secrets dashboard after saving it (secrets are never displayed in clear text).

What I can do as the author of the action is follow the official release management recommendations and work with a v1 branch. I will rename the master branch to v1 and continue releasing on this branch. If I ever need to introduce breaking changes, I will create a v2 branch and release there. With this policy you can safely specify a branch name such as: pozil/auto-assign-issue@v1 and you'll get the latest v1 release. This is a good alternative to using release tags such as pozil/auto-assign-issue@v1.2.0.

ajaydwarkani commented 2 years ago

@pozil , I think sub versioning is better for users who do not want to take the latest changes. For solving the issue at my end, I wrote a script to globally update the version via Github API. I guess you can close this issue.