From 4d5734a0a29e548daecc9e7bfeb9bb8b3acdee1e Mon Sep 17 00:00:00 2001 From: Marco Lecheler Date: Fri, 3 Nov 2023 10:40:37 +0100 Subject: [PATCH] feat: Use `github.api_url` as default for `githubBaseUrl` (#243 by @fty4) --- README.md | 3 ++- action.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ddf5d26b..f57bac1b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,8 @@ feat(ui): Add `Button` component The subject "{subject}" found in the pull request title "{title}" didn't match the configured pattern. Please ensure that the subject doesn't start with an uppercase character. - # If you use GitHub Enterprise, you can set this to the URL of your server + # The GitHub base URL will be automatically set to the correct value from the GitHub context variable. + # If you want to override this, you can do so here (not recommended). githubBaseUrl: https://github.myorg.com/api/v3 # If the PR contains one of these newline-delimited labels, the # validation is skipped. If you want to rerun the validation when diff --git a/action.yml b/action.yml index 130dcadc..bfcde5d8 100644 --- a/action.yml +++ b/action.yml @@ -33,8 +33,9 @@ inputs: description: "Related to `validateSingleCommit` you can opt-in to validate that the PR title matches a single commit to avoid confusion." required: false githubBaseUrl: - description: "If you use Github Enterprise, you can set this to the URL of your server (e.g. https://github.myorg.com/api/v3)" + description: "The GitHub base URL will be automatically set to the correct value from the GitHub context variable. If you want to override this, you can do so here (not recommended)." required: false + default: '${{ github.api_url }}' ignoreLabels: description: "If the PR contains one of these labels (newline delimited), the validation is skipped. If you want to rerun the validation when labels change, you might want to use the `labeled` and `unlabeled` event triggers in your workflow." required: false