Skip to content

Commit

Permalink
chore: Fix GitHub URL in github-pr-comment
Browse files Browse the repository at this point in the history
fix: `fcli fod action run github-pr-comment`: Use `GITHUB_API_URL` environment variable instead of hardcoded api.github.com to avoid failure on GitHub Enterprise

fix: `fcli ssc action run github-pr-comment`: Use `GITHUB_API_URL` environment variable instead of hardcoded api.github.com to avoid failure on GitHub Enterprise
  • Loading branch information
rsenden committed Dec 11, 2024
1 parent 7398e2a commit da7eba3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ parameters:
description: "Scan type for which to list vulnerabilities. Default value: Static"
required: true
defaultValue: Static
- name: github-api-url
description: 'Required GitHub API URL. Default value: GITHUB_API_URL environment variable.'
required: true
defaultValue: ${#env('GITHUB_API_URL')}
- name: github-token
description: 'Required GitHub Token. Default value: GITHUB_TOKEN environment variable.'
required: true
Expand Down Expand Up @@ -68,7 +72,7 @@ parameters:

addRequestTargets:
- name: github
baseUrl: https://api.github.com
baseUrl: ${parameters['github-api-url']}
headers:
Authorization: Bearer ${parameters['github-token']}
'X-GitHub-Api-Version': '2022-11-28'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ parameters:
description: "Analysis type for which to list vulnerabilities. Default value: SCA"
required: true
defaultValue: SCA
- name: github-api-url
description: 'Required GitHub API URL. Default value: GITHUB_API_URL environment variable.'
required: true
defaultValue: ${#env('GITHUB_API_URL')}
- name: github-token
description: 'Required GitHub Token. Default value: GITHUB_TOKEN environment variable.'
required: true
Expand Down Expand Up @@ -72,7 +76,7 @@ parameters:

addRequestTargets:
- name: github
baseUrl: https://api.github.com
baseUrl: ${parameters['github-api-url']}
headers:
Authorization: Bearer ${parameters['github-token']}
'X-GitHub-Api-Version': '2022-11-28'
Expand Down

0 comments on commit da7eba3

Please sign in to comment.