Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 720c5f8

Browse files
authored
feat(input): add github GraphQL URL configuration for input (#385)
1 parent 413fe37 commit 720c5f8

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Automate releases with Conventional Commit Messages.
6363
| `github-api-url` | configure github API URL. Default `https://api.github.com` |
6464
| `--signoff` | Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line at the end of the commit log message using the user and email provided. (format "Name \<email@example.com\>") |
6565
| `repo-url` | configure github repository URL. Default `process.env.GITHUB_REPOSITORY` |
66+
| `github-graphql-url` | configure github GraphQL URL. Default `https://api.github.com` |
6667

6768
| output | description |
6869
|:---:|---|

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ inputs:
7676
description: 'configure github API URL. Default `https://api.github.com`'
7777
required: false
7878
default: ''
79+
github-graphql-url:
80+
description: 'configure github GraphQL URL. Default `https://api.github.com`'
81+
required: false
82+
default: ''
7983
repo-url:
8084
description: 'configure github repository URL. Default `process.env.GITHUB_REPOSITORY`'
8185
required: false

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const RELEASE_LABEL = 'autorelease: pending'
88
const GITHUB_RELEASE_COMMAND = 'github-release'
99
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
1010
const GITHUB_API_URL = 'https://api.github.com'
11+
const GITHUB_GRAPHQL_URL = 'https://api.github.com'
1112

1213
const signoff = core.getInput('signoff') || undefined
1314

@@ -26,6 +27,7 @@ function getGitHubInput () {
2627
defaultBranch: core.getInput('default-branch') || undefined,
2728
repoUrl: core.getInput('repo-url') || process.env.GITHUB_REPOSITORY,
2829
apiUrl: core.getInput('github-api-url') || GITHUB_API_URL,
30+
graphqlUrl: core.getInput('github-graphql-url') || GITHUB_GRAPHQL_URL,
2931
token: core.getInput('token', { required: true })
3032
}
3133
}
@@ -81,7 +83,7 @@ async function main () {
8183
return await runManifest(command)
8284
}
8385

84-
const { token, fork, defaultBranch, apiUrl, repoUrl } = getGitHubInput()
86+
const { token, fork, defaultBranch, apiUrl, graphqlUrl, repoUrl } = getGitHubInput()
8587

8688
const bumpMinorPreMajor = getBooleanInput('bump-minor-pre-major')
8789
const bumpPatchForMinorPreMajor = getBooleanInput('bump-patch-for-minor-pre-major')
@@ -109,7 +111,8 @@ async function main () {
109111
releaseType,
110112
defaultBranch,
111113
pullRequestTitlePattern,
112-
apiUrl
114+
apiUrl,
115+
graphqlUrl
113116
})
114117

115118
if (releaseCreated) {
@@ -129,6 +132,7 @@ async function main () {
129132
packageName,
130133
path,
131134
apiUrl,
135+
graphqlUrl,
132136
repoUrl,
133137
fork,
134138
token,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"homepage": "https://github.com/bcoe/release-please-action#readme",
2727
"dependencies": {
2828
"@actions/core": "^1.2.6",
29-
"release-please": "^12.5.0"
29+
"release-please": "^12.6.0"
3030
},
3131
"devDependencies": {
3232
"@vercel/ncc": "^0.27.0",

0 commit comments

Comments
 (0)