-
Notifications
You must be signed in to change notification settings - Fork 428
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
Goes incorrectly toward api.github.com on Github Enterprise after upgrading to v7 #436
Comments
The plot thickens. Just to try something else, if |
That doesn't work either, though it's possible my integration test is flawed. |
I tried out my thesis on the Github Enterprise Server instance now, it worked! So, it seems that defaulting - uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-url: ${{ github.api_url }}
script: |
const { data: pr } = await github.rest.issues.get({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
}); |
@gustavkj could you see if this works on your GHES instance?
That's the branch from #437 |
I don't have the latest commit (the GHES instance synced the actions from Github.com last night, so the last commit is 85717e4), it went green but it has other changes. I tried also also going back and ran pinned to commit sha 28e4318, which I think is the same as the latest commit. And it worked as well! Given that there is a way to force the workflow to go towards the action on Github.com instead of the one synced to the GHES instance, I can give that a try. But I'm not aware of any workaround. Do you know? Otherwise, as I said, I think 28e4318 is the same as the latest commit, right? |
28e4318 is the same, that's right. Thanks for verifying it works, looks like my integration test doesn't actually cover this case.
Not if you have a local version of the same action, no. |
Should be fixed in https://github.com/actions/github-script/releases/tag/v7.0.1 and |
Thank you for fixing it so fast! I'll try it out when I'm back at work on Monday. Thanks again! 🌟 |
Hi again! I can confirm that it works now. 🌟 Thanks once more! |
Describe the bug
After upgrading to
v7
requests in workflows on Github Enterprise are sent toapi.github.com
instead of using theGITHUB_API_URL
environment variable.Seems like that #429 broke the default behavior of
@actions/github
:https://github.com/actions/toolkit/blob/20f826bfe76164099ab2403d9ea8509e16843223/packages/github/src/internal/utils.ts#L42-L44
To Reproduce
Steps to reproduce the behavior:
v7
, but run the same thing:api.github.com
:Expected behavior
It should still use the
GITHUB_API_URL
environment variable, and not require extra configuration to work on Github EnterpriseThe text was updated successfully, but these errors were encountered: