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

blackduck_automation_prcomment with GitHub Enterprise #111

Closed
Carsten87 opened this issue Jun 16, 2023 · 16 comments
Closed

blackduck_automation_prcomment with GitHub Enterprise #111

Carsten87 opened this issue Jun 16, 2023 · 16 comments

Comments

@Carsten87
Copy link

How can I configure the synopsys-action to work with GitHub Enterprise? If I set blackduck_automation_prcomment: true the action tries to communicate with github.com instead of the GH Enterprise instance the action is running on which obviously fails.

I think the action itself should figure out where it is running and select the appropriate API endpoint accordingly.

2023-06-16 10:34:37.7338 CEST [GitHub Commenter] INFO: will use default GitHub API URL "https://api.github.com/", as "github.api.url" is not configured
2023-06-16 10:34:37.9617 CEST [GitHub Commenter] ERROR: authorization failure - please check if the value configured for "github.user.token" has appropriate permissions: Bad credentials: Received unexpected response status code '401 Unauthorized' from GitHub API
2023-06-16 10:34:37.9874 CEST [GitHub Commenter] ERROR: Adapter failed: exit status 1
Error: Workflow failed! Exit Code: 2 Error from adapter end
@frederikb
Copy link

I can confirm. We're running into the same problem.

Looking at the implementation of tools-parameter.ts there seems to be no override possible, even though the Synopsys Bridge exposes the setting github.api.url. I would be fine with an additional optional input parameter to the action itself which defaults to "GitHub", but allows me to override with our GHES domai.

@tvcsantos
Copy link

Actually there is no need for a custom input parameter the API URL is already provided out-of-the-box in GitHub actions context by the env variable GITHUB_API_URL.

@tvcsantos
Copy link

A PR #115 was opened to address this issue.

@sig-tithi
Copy link
Collaborator

We are working on it and fix will be available sometime next month.

@tvcsantos
Copy link

We are working on it and fix will be available sometime next month.

Nice 👍 . Thanks for the feedback

@ToWi87
Copy link

ToWi87 commented Aug 18, 2023

Hello @tvcsantos,
I just tried to verify your fix, but am running in a new problem:
[GitHub Commenter] ERROR: Not Found: Received unexpected response status code '404 Not Found' from GitHub API

What settings did you run this so it worked? I didn't change anything beside using your PR's code.

@tvcsantos
Copy link

tvcsantos commented Aug 28, 2023

Hello @tvcsantos, I just tried to verify your fix, but am running in a new problem: [GitHub Commenter] ERROR: Not Found: Received unexpected response status code '404 Not Found' from GitHub API

What settings did you run this so it worked? I didn't change anything beside using your PR's code.

Hey @ToWi87, we are facing the same problem. This PR only addresses the URL change. Since synopsys uses bridge to do the remaining steps and bridge is a blackbox and I don't have access to the code I was not able to investigate further :(.

@gonmmarques
Copy link

gonmmarques commented Aug 28, 2023

We are working on it and fix will be available sometime next month.

Hello, by any chance can you please share when this might be available? Thanks

@gonmmarques
Copy link

gonmmarques commented Sep 14, 2023

We are working on it and fix will be available sometime next month.

Hello again, we are already mid September, any ETA here? @spurohitsynopsys (sorry for tagging but no one seems to reply here)

@sig-tithi
Copy link
Collaborator

@gonmmarques - Apologies for the delay. We couldn't look into or verify this issue during our past release due to some infrastructure issue on our end and also other priority items. We will look into this and keep you posted.

@ToWi87
Copy link

ToWi87 commented Oct 19, 2023

Hello again,
after seeing this: https://github.com/synopsys-sig/synopsys-action/releases/tag/v1.5.0
I briefly tried to run this with blackduck_automation_prcomment: true

Here my feedback:

Run synopsys-sig/synopsys-action@v1.5.0
Synopsys Action started...
Blackduck Automation comment is enabled
Error: Workflow failed! Missing required github token for fix pull request/automation comment

And then the whole step is killed.

My GH Action config is (as of https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_additional-github-parameters.html)
set to
image

Can someone confirm this?

@ToWi87
Copy link

ToWi87 commented Oct 19, 2023

update from myself:

with:
  github_token: ${{ github.token }} (instead of secrets.GITHUB_TOKEN as mentioned in the docs)

I am back to my initial 404 report: #111 (comment)

@sig-tithi
Copy link
Collaborator

The fix is not yet available, we are working with our internal teams to prioritise it.

@benlamm-abi
Copy link

Any updates here? May be there is already a prediction for the release date of the fix, so that we can better plan further steps? What is the official workaround? Using Detect Rapid Scan Action?

@sig-tithi
Copy link
Collaborator

Any updates here? May be there is already a prediction for the release date of the fix, so that we can better plan further steps? What is the official workaround? Using Detect Rapid Scan Action?

  • Please try with latest 1.6.0 version for PR comment support for GitHub Enterprise environment

@Carsten87
Copy link
Author

I can confirm that it works on my end now.

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 a pull request may close this issue.

7 participants