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

feat(config): Try SCOOP_GH_TOKEN value first before gh_token value from config #4842

Merged
merged 1 commit into from Mar 26, 2022

Conversation

ghost
Copy link

@ghost ghost commented Mar 25, 2022

Description

There are multiple usages of GitHub token value in the scoop (in checkver.ps1, core.ps1, install.ps1), but only in once place (in checkver.ps1), there is a logic to try using token value from SCOOP_GH_TOKEN environment variable first. This PR unifies the token value obtain logic and puts it into the function, which is used everywhere token value is needed.

Motivation

Using token in environment variable is needed for GitHub Actions setup (I am setting up GitHub Actions for private bucket right now and token is required for accessing artifacts located in private repository).

How Has This Been Tested?

Tested with private GitHub repositories using both gh_token and SCOOP_GH_TOKEN values.

Checklist:

  • I have read the Contributing Guide.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@ghost ghost changed the title Scoop gh token feat: try SCOOP_GH_TOKEN value first before gh_token value from config Mar 25, 2022
@ghost ghost changed the title feat: try SCOOP_GH_TOKEN value first before gh_token value from config feat(config): try SCOOP_GH_TOKEN value first before gh_token value from config Mar 25, 2022
Copy link
Member

@rasa rasa left a comment

Choose a reason for hiding this comment

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

Untested but LGTM

@niheaven niheaven changed the title feat(config): try SCOOP_GH_TOKEN value first before gh_token value from config feat(config): Try SCOOP_GH_TOKEN value first before gh_token value from config Mar 26, 2022
@niheaven niheaven merged commit f441968 into ScoopInstaller:develop Mar 26, 2022
@ghost ghost deleted the scoop_gh_token branch March 26, 2022 16:58
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.

None yet

3 participants