-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set --source-control-url on push #86
Conversation
@doriable @emcfarlane I have not actually tested this. Please test and takeover this PR to make any changes necessary. |
// We want push to succeed without additional user configuration even if the action is being run on an | ||
// enterprise GitHub instance. Because enterprise GitHub instances can have an arbitrary URL, the Buf CLI with not be | ||
// able to automatically detect the source control url, so we set it explicitly. | ||
const sourceControlUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could have tried to make this conditional and only set this if we are on an enterprise instance, but it seems better/simpler to always set it and ensure it works everywhere instead of having multiple code paths.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Below is the draft release notes: ## What's Changed * Add migration guide doc by @emcfarlane in #74 * Set --debug when the action is using debug logging by @emcfarlane in #78 * Set --source-control-url on push so that the push action now works by default on enterprise GitHub instances by @nicksnyder in #86 ## New Contributors * @doriable made their first contribution in #98 **Full Changelog**: v1.0.2...v1.0.3
This ensures push will work on enterprise GitHub instances that have arbitrary URLs.