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

Add support for GitHub enterprise commit status #162

Merged
merged 1 commit into from
Mar 21, 2021

Conversation

phillebaba
Copy link
Member

@phillebaba phillebaba commented Mar 16, 2021

Adds support for Github enterprise clients by checking the host of the url. If it is not github.com it is assumed that the enterprise client should be used.

Fixes #161

client := github.NewClient(tc)
if baseUrl.Host != "github.com" {
client, err = github.NewEnterpriseClient(host, host, tc)
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if the api and upload url should be the same. Right now it will be easiest to do it this way, but there may be instances where these are different.

@paschdan
Copy link

for me this is working:

image

@phillebaba
Copy link
Member Author

@paschdan thanks! Really appreciate you taking the time to verify this.

@phillebaba phillebaba marked this pull request as ready for review March 20, 2021 19:44
@stefanprodan stefanprodan changed the title Add support for GitHub enterprise client Add support for GitHub enterprise commit status Mar 21, 2021
@stefanprodan stefanprodan added the area/alerting Alerting related issues and PRs label Mar 21, 2021
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @phillebaba and @paschdan

@stefanprodan stefanprodan merged commit e0e4204 into main Mar 21, 2021
@stefanprodan stefanprodan deleted the feature/github-enterprise branch March 21, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Alerting related issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enterprise github repo: not generating events and unable to write commit status to github
3 participants