1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-10 23:21:15 +02:00

feat: read github api/graphql url from action context (#532)

* feat: read github api/graphql url from action context

* fix tests

Co-authored-by: Jeff Ching <chingor@google.com>
This commit is contained in:
Chao Yang Wu
2022-08-11 02:13:16 +08:00
committed by GitHub
parent 44827541d2
commit 922ac8b6db
2 changed files with 3 additions and 3 deletions

View File

@@ -75,11 +75,11 @@ inputs:
github-api-url:
description: 'configure github API URL. Default `https://api.github.com`'
required: false
default: ''
default: ${{ github.api_url }}
github-graphql-url:
description: 'configure github GraphQL URL. Default `https://api.github.com`'
required: false
default: ''
default: ${{ github.graphql_url }}
repo-url:
description: 'configure github repository URL. Default `process.env.GITHUB_REPOSITORY`'
required: false

View File

@@ -18,7 +18,7 @@ function getGitHubInput () {
defaultBranch: core.getInput('default-branch') || undefined,
repoUrl: core.getInput('repo-url') || process.env.GITHUB_REPOSITORY,
apiUrl: core.getInput('github-api-url') || GITHUB_API_URL,
graphqlUrl: core.getInput('github-graphql-url') || GITHUB_GRAPHQL_URL,
graphqlUrl: (core.getInput('github-graphql-url') || '').replace(/\/graphql$/, '') || GITHUB_GRAPHQL_URL,
token: core.getInput('token', { required: true })
}
}