Skip to content

Add Token Location to Verbose Output #1048

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

Conversation

pseudotsuga-fir
Copy link
Contributor

What I did

Fixed issue #1047 where verbose output did not detect when token came from the CHANGELOG_GITHUB_TOKEN ENV variable. Updated value to specify if it came from options or ENV vars.

How I did it

Added new method censored_token to options.rb. Method censors the token by specifying where the token came from, or if it wasn't used.

How to verify

  • Run the changelog generator with no token in ENV vars or in options. See that verbose output includes: :token=>"No token used"
  • Run the changelog generator with token in options. See that output includes: :token=>"Used token from options"
  • Run the changelog generator with token in ENV vars. See that output includes: :token=>"Used token from environment variable"
  • Run the changelog generator with token in both the ENV vars and options. See that output specifies token is used from options: :token=>"Used token from options"

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Thank you, @pseudotsuga-fir!

@olleolleolle olleolleolle linked an issue Jun 12, 2024 that may be closed by this pull request
@olleolleolle olleolleolle merged commit 5b4f473 into github-changelog-generator:master Jun 12, 2024
3 checks passed
@pseudotsuga-fir pseudotsuga-fir deleted the 1047-fix-verbose-output branch June 12, 2024 15:46
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.

Verbose output says token is not in use
2 participants