Skip to content

Added support for Enterprise GitHub - #170

Open
yogeshkumararora wants to merge 2 commits into
mheap:mainfrom
yogeshkumararora:main
Open

yogeshkumararora wants to merge 2 commits into
mheap:mainfrom
yogeshkumararora:main

Conversation

@yogeshkumararora

Copy link
Copy Markdown

No description provided.

@isaacsanders

Copy link
Copy Markdown

I think it might be better to use GH_HOST like the gh-cli does: https://cli.github.com/manual/gh_help_environment

@mheap

mheap commented Nov 11, 2024

Copy link
Copy Markdown
Owner

I agree with @isaacsanders. I'd be happy to merge a GH_HOST PR

@marcellodesales

marcellodesales commented Dec 11, 2025 •

Copy link
Copy Markdown

I would suggest using process.env.GITHUB_API_URL, given that you are building a cloud-native solution... I will fork this repo and evaluate, but I would verify the following requirements:

IF your organization has a Github Actions mirror solution to GHES, then this action MUST:

   uses: org/repo@v1.0.0
  • Query ${{ github.api_url }}/{owner}/{repo}/git/refs/v1.0.0 for the current server... If 404
    • Query https://api.github.com/repos/{owner}/{repo}/git/refs/v1.0.0 for the sake of verifying whether or not the action is actually from a verified Org owner, or/and has been a whitelisted Github Actions by the Enterprise Organization owner.
    • There's another tag value corner case from the Refs API I can't recall, but to make it fully work I think there's some verification and test cases to be added

At this point, the PR is fairly incomplete and it would break under our GHES and in future isolated GHEC, whose both ${{ github.api_url }} != https://api.github.com

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.

4 participants