Skip to content

Conversation

@gabr1elt
Copy link
Contributor

@gabr1elt gabr1elt commented Aug 8, 2025

Adds the github token as env var for the run.sh script

Adds the github token as env var for the run.sh script
@gabr1elt
Copy link
Contributor Author

gabr1elt commented Aug 8, 2025

closes #62

@orhun
Copy link
Owner

orhun commented Aug 9, 2025

Hmm, does this override the custom GITHUB_TOKEN set in the action? If so, that's kinda bad.

What I mean is:

      - name: Generate a changelog
        uses: orhun/git-cliff-action@v4
        env:
          GITHUB_TOKEN: <custom-token>

in that case, which GITHUB_TOKEN is being used?

shell: bash
run: ${GITHUB_ACTION_PATH}/run.sh --config=${{ inputs.config }} ${{ inputs.args }}
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN || inputs.github_token }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

I’m not an expert in composite actions, and the docs are a bit vague on this subject.

But if they work like regular workflows, adding env.GITHUB_TOKEN || would make the env var on the ‘action’ step to use the env var of the ‘job’ step if supplied. Or use the input token if empty.

@gabr1elt
Copy link
Contributor Author

I think the new changes should give the appropriate behavior.
@orhun let me know what you think

@gabr1elt
Copy link
Contributor Author

@orhun have you had time to check my latest changes?

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, yeah, I'm counting on common sense and it should work as expected now.

Thanks for the PR!

@orhun orhun merged commit 82629b3 into orhun:main Sep 1, 2025
1 check passed
@gabr1elt
Copy link
Contributor Author

gabr1elt commented Sep 1, 2025

No Pb, I was on vacation 😄

When can we expect the new release?

@orhun
Copy link
Owner

orhun commented Sep 1, 2025

Hopefully soon. I usually do it after I create a new release of git-cliff though

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 this pull request may close these issues.

2 participants