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(download): Add support for Github Enterprise #5448

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ldoin
Copy link

@ldoin ldoin commented Mar 28, 2023

This pull requests is related to #5447 and is aimed at adding support for Github Enterprise.

It's based on what has been done for private repositories hosted on github.com with #4254. A new attribute has been added to private hosts config for Accept header since it's not possible to set it like other headers.

I've successfully installed a tool available as a release in a Github Enterprise instance (https://github.company.com/owner/repo/releases/download/tag/XXXXXX_windows_amd64.zip) using the following config.

{
    "last_update":  "2023-03-28T15:12:26.6797756+02:00",
    "private_hosts":  [
                          {
                              "match":  "https://github.company.com/*",
                              "headers":  "Authorization=token ghp_XXXXXXXXXXXXXXXXXX",
                              "Accept":  "application/octet-stream"
                          }
                      ],
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@ldoin
Copy link
Author

ldoin commented May 17, 2023

If you have any questions, suggestions, or concerns regarding my pull request, I would be happy to discuss them and make any necessary changes.

Please let me know if I can / should do anything.

@rendevor
Copy link

I am not 100% sure, that pinning the existing approach for Github enterprise is a good approach.
I guess private repos and packages should be more flexible and support various platforms. Not only Github enterprise.

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