Skip to content

Avoid setting baseUrl to undefined when input is not provided - #439

Merged
joshmgross merged 1 commit into
mainfrom
joshmgross/avoid-setting-base-url
Nov 17, 2023
Merged

joshmgross merged 1 commit into
mainfrom
joshmgross/avoid-setting-base-url

Conversation

@joshmgross

@joshmgross joshmgross commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

Fixes #436

Replaces #437

Due to how options are passed through @actions/github to Octokit, an undefined baseUrl prevents the default from being used. This breaks using github-script on GHES, which requires the GHES instance API URL.

#437 attempted to reproduce this issue in a test, but it was unsuccessful. There's a similar issue in the integration test, but the fix doesn't work despite it being confirmed in #436 (comment).
I've included the other integration tests, but they don't cover this specific scenario or what we're trying to fix.

@joshmgross
joshmgross requested a review from a team as a code owner November 17, 2023 17:03
@joshmgross
joshmgross temporarily deployed to debug-integration-test November 17, 2023 17:03 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown

Hello from actions/github-script! (52c67b9)

return endpoint({url: "/graphql"}).url
result-encoding: string

- run: |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love maintaining all these bash scripts for the integration tests in the workflow, but we can improve later and fix all of the integrationt tests at once.

@joshmgross
joshmgross merged commit 12e22ed into main Nov 17, 2023
@joshmgross
joshmgross deleted the joshmgross/avoid-setting-base-url branch November 17, 2023 19:13
kayman-mk referenced this pull request in Hapag-Lloyd/Renovate-Global-Configuration Nov 19, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/github-script](https://togithub.com/actions/github-script) |
action | major | `v6.4.0` -> `v7.0.1` |

---

### Release Notes

<details>
<summary>actions/github-script (actions/github-script)</summary>

###
[`v7.0.1`](https://togithub.com/actions/github-script/releases/tag/v7.0.1)

[Compare
Source](https://togithub.com/actions/github-script/compare/v7.0.0...v7.0.1)

##### What's Changed

- Avoid setting `baseUrl` to undefined when input is not provided by
[@&#8203;joshmgross](https://togithub.com/joshmgross) in
[https://github.com/actions/github-script/pull/439](https://togithub.com/actions/github-script/pull/439)

**Full Changelog**:
actions/github-script@v7.0.0...v7.0.1

###
[`v7.0.0`](https://togithub.com/actions/github-script/releases/tag/v7.0.0)

[Compare
Source](https://togithub.com/actions/github-script/compare/v6.4.1...v7.0.0)

##### What's Changed

- Add base-url option by
[@&#8203;robandpdx](https://togithub.com/robandpdx) in
[https://github.com/actions/github-script/pull/429](https://togithub.com/actions/github-script/pull/429)
- Expose async-function argument type by
[@&#8203;viktorlott](https://togithub.com/viktorlott) in
[https://github.com/actions/github-script/pull/402](https://togithub.com/actions/github-script/pull/402),
see for details
https://github.com/actions/github-script#use-scripts-with-jsdoc-support
- Update dependencies and use Node 20 by
[@&#8203;joshmgross](https://togithub.com/joshmgross) in
[https://github.com/actions/github-script/pull/425](https://togithub.com/actions/github-script/pull/425)

##### New Contributors

- [@&#8203;navarroaxel](https://togithub.com/navarroaxel) made their
first contribution in
[https://github.com/actions/github-script/pull/285](https://togithub.com/actions/github-script/pull/285)
- [@&#8203;robandpdx](https://togithub.com/robandpdx) made their first
contribution in
[https://github.com/actions/github-script/pull/429](https://togithub.com/actions/github-script/pull/429)
- [@&#8203;viktorlott](https://togithub.com/viktorlott) made their first
contribution in
[https://github.com/actions/github-script/pull/402](https://togithub.com/actions/github-script/pull/402)

**Full Changelog**:
actions/github-script@v6.4.1...v7.0.0

###
[`v6.4.1`](https://togithub.com/actions/github-script/releases/tag/v6.4.1)

[Compare
Source](https://togithub.com/actions/github-script/compare/v6.4.0...v6.4.1)

#### What's Changed

- Add
[@&#8203;octokit/plugin-request-log](https://togithub.com/octokit/plugin-request-log),
to produce debug output for requests by
[@&#8203;mjpieters](https://togithub.com/mjpieters) in
[https://github.com/actions/github-script/pull/358](https://togithub.com/actions/github-script/pull/358)
- fix input handling by
[@&#8203;mjpieters](https://togithub.com/mjpieters) in
[https://github.com/actions/github-script/pull/357](https://togithub.com/actions/github-script/pull/357)
- Remove unused dependencies by
[@&#8203;mjpieters](https://togithub.com/mjpieters) in
[https://github.com/actions/github-script/pull/356](https://togithub.com/actions/github-script/pull/356)
- Default debug to current runner debug state by
[@&#8203;mjpieters](https://togithub.com/mjpieters) in
[https://github.com/actions/github-script/pull/363](https://togithub.com/actions/github-script/pull/363)

#### New Contributors

- [@&#8203;mjpieters](https://togithub.com/mjpieters) made their first
contribution in
[https://github.com/actions/github-script/pull/358](https://togithub.com/actions/github-script/pull/358)

**Full Changelog**:
actions/github-script@v6.4.0...v6.4.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Hapag-Lloyd/Renovate-Global-Configuration).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fuxingloh referenced this pull request in fuxingloh/xmatter Nov 20, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/github-script](https://togithub.com/actions/github-script) |
action | patch | `v7.0.0` -> `v7.0.1` |

---

### Release Notes

<details>
<summary>actions/github-script (actions/github-script)</summary>

###
[`v7.0.1`](https://togithub.com/actions/github-script/releases/tag/v7.0.1)

[Compare
Source](https://togithub.com/actions/github-script/compare/v7.0.0...v7.0.1)

##### What's Changed

- Avoid setting `baseUrl` to undefined when input is not provided by
[@&#8203;joshmgross](https://togithub.com/joshmgross) in
[https://github.com/actions/github-script/pull/439](https://togithub.com/actions/github-script/pull/439)

**Full Changelog**:
actions/github-script@v7.0.0...v7.0.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/levaintech/frontmatter).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
duwenxin99 referenced this pull request in GoogleCloudPlatform/cymbal-air-toolbox-demo Nov 20, 2023