-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add GitHub Enterprise support #106
Conversation
I don't have access to GitHub Enterprise, so I merge as is and I hope that it works. Could you verify by testing |
@ad-m Sure, I can test it. |
I reversed that PR as it break build. https://github.com/ad-m/github-push-action/runs/5245447913?check_suite_focus=true Feel free to resubmit after fixing that build. Should we use |
if (!branch) { | ||
const headers = { | ||
'User-Agent': 'github.com/ad-m/github-push-action' | ||
}; | ||
if (process.env.INPUT_GITHUB_TOKEN) headers.Authorization = `token ${process.env.INPUT_GITHUB_TOKEN}`; | ||
const body = JSON.parse(await get(`https://api.github.com/repos/${repository}`, { headers })) | ||
const api_url = github_url === 'github.com' ? 'api.github.com' : github_url + '/api/v3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, for the hint. I've opened a fresh modified draft PR.
@ad-m does the test also run on PR’s from forks ? We might’ve caught this earlier. |
* Update the GitHub action Update build.yml Remove push command Add GitHub Enterprise support (ad-m#106) * Add GitHub url and GitHub Enterprise support * Add review improvements * Modify the default value to github.server_url Revert "Add GitHub Enterprise support (ad-m#106)" (ad-m#107) This reverts commit a7824cd. Add a PR validation action (ad-m#109) Added workaround as suggested by the git itself (ad-m#112) * Added workaround as suggested by the git itself * Update start.sh Co-authored-by: Pascal Zimmermann <Z_pascal@yahoo.de> Co-authored-by: aleksandr.abroskin <aleksandr.abroskin@getmoss.com> Co-authored-by: Adam Dobrawy <ad-m@users.noreply.github.com> Co-authored-by: Pascal Zimmermann <Z_pascal@yahoo.de> Update the PR and remove the test mode Delete build-pr.yml Add first version of deploy keys support Update the README.md
Hi @ad-m, I've modified the push action a bit to specify the used GitHub URL and make it possible to support GitHub Enterprise instances.
Regards,
ZPascal