You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deployment URL for GitHub Enterprise cannot be parsed. As a result, ParseDeploymentURL in pkg/github/deployment.go will always return nil and deployment statuses in GitHub will never be updated when phases change.
// For example, https://api.github.com/repos/int128/sandbox/deployments/422988781
funcParseDeploymentURL(sstring) *Deployment {
m:=patternDeploymentURL.FindStringSubmatch(s)
iflen(m) !=4 {
returnnil
}
As an example, our GitHub Enterprise URL https://api.github.some-company.com/repos/IOTA/repo/deployments/54392 will never match the regex.
This also does not seem to be the only place the issue occurs. In pkg/github/types.go there are also some hardcoded regexes for the public github.com.
Problem
The deployment URL for GitHub Enterprise cannot be parsed. As a result,
ParseDeploymentURL
inpkg/github/deployment.go
will always returnnil
and deployment statuses in GitHub will never be updated when phases change.argocd-commenter/pkg/github/deployment.go
Lines 17 to 25 in b7c7602
As an example, our GitHub Enterprise URL
https://api.github.some-company.com/repos/IOTA/repo/deployments/54392
will never match the regex.This also does not seem to be the only place the issue occurs. In
pkg/github/types.go
there are also some hardcoded regexes for the public jackfan.us.kg.argocd-commenter/pkg/github/types.go
Lines 23 to 26 in b7c7602
Edit
I just discovered that the issue also occurs in https://github.com/int128/oauth2-github-app. The
config.go
file also has the hardcoded public github.com URL.Solution
Can the regex either be made less strict on the hostname, or be constructed using the
GITHUB_ENTERPRISE_URL
from the secret?The text was updated successfully, but these errors were encountered: