Skip to content

Commit

Permalink
feat(github): add support for specifying a github-use-graphql option (#1
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RobertCraigie committed Apr 11, 2023
1 parent d37a6c9 commit 6e6914f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Automate releases with Conventional Commit Messages.
| `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\>") |
| `repo-url` | configure github repository URL. Default `process.env.GITHUB_REPOSITORY` |
| `github-graphql-url` | configure github GraphQL URL. Default `https://api.github.com` |
| `github-use-graphql` | whether or not to use the github GraphQL API at all. Default `true` |
| `changelog-notes-type` | Strategy for building the [changelog contents](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#changelog-types). Default `default`. Called `changelog-type` in release-please documentation. |
| `changelog-host` | Host for commit hyperlinks in the changelog. Default `https://github.com` |
| `versioning-strategy` | Override [method of determining SemVer version bumps based on commits](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#versioning-strategies). Default `default` |
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function getGitHubInput () {
repoUrl: core.getInput('repo-url') || process.env.GITHUB_REPOSITORY,
apiUrl: core.getInput('github-api-url') || GITHUB_API_URL,
graphqlUrl: (core.getInput('github-graphql-url') || '').replace(/\/graphql$/, '') || GITHUB_GRAPHQL_URL,
useGraphql: getOptionalBooleanInput('use-graphql'),
token: core.getInput('token', { required: true }),
proxyServer: core.getInput('proxy-server') || undefined
}
Expand Down Expand Up @@ -120,7 +121,8 @@ function getGitHubInstance () {
repo,
apiUrl,
graphqlUrl,
token
token,
useGraphql,
}
if (defaultBranch) githubCreateOpts.defaultBranch = defaultBranch
return GitHub.create(githubCreateOpts)
Expand Down

0 comments on commit 6e6914f

Please sign in to comment.