Skip to content
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

Fix overriding request options from @actions/github #293

Merged
merged 1 commit into from Sep 30, 2022

Conversation

luketomlinson
Copy link
Contributor

@luketomlinson luketomlinson commented Sep 30, 2022

Problem

Since introducing retries in #288, we would override the request field of the OctokitOptions we pass into the getOctokit method. The problem is that the @actions/github package also provides some defaults for the request field. source. Some users rely on these defaults and would break since we added retries.

Behavior:

If we have these defaults:

{
  request: {
    agent: 'some-agent'
  }
}

and add these options:

{
  request: {
    retries: 2
  }
}

we get the following output:

{
  request: {
    retries: 2
  }
}

Note the original options are completely overriden, which is not desired.

Solution

We copy the default options.request fields from the @actions/github package into the request field when we add the retries field.

Fixed behavior:

if we have these defaults:

{
  request: {
    agent: 'some-agent'
  }
}

and add these options:

{
  request: {
    retries: 2
  }
}

we get the following output:

{
  request: {
    agent: 'some-agent',
    retries: 2
  }
}

fixes #291

@joshmgross joshmgross merged commit 7dff1a8 into actions:main Sep 30, 2022
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Oct 4, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Oct 4, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54373


git-svn-id: http://core.svn.wordpress.org/trunk@53932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Oct 4, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.
Built from https://develop.svn.wordpress.org/trunk@54373


git-svn-id: https://core.svn.wordpress.org/trunk@53932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
fuxingloh pushed a commit to DeFiCh/metachain that referenced this pull request Oct 12, 2022
[![Mend
Renovate](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 | minor | `v6.2.0` -> `v6.3.2` |

---

### Release Notes

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

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

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

##### What's Changed

- Update [@&#8203;actions/core](https://togithub.com/actions/core) to
1.10.0 by [@&#8203;rentziass](https://togithub.com/rentziass) in
[actions/github-script#295

##### New Contributors

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

**Full Changelog**:
actions/github-script@v6.3.1...v6.3.2

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

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

#### What's Changed

- Fix overriding request options from
[@&#8203;actions/github](https://togithub.com/actions/github) by
[@&#8203;luketomlinson](https://togithub.com/luketomlinson) in
[actions/github-script#293

**Full Changelog**:
actions/github-script@v6.3.0...v6.3.1

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

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

#### What's Changed

- Add retry plugin and related options by
[@&#8203;luketomlinson](https://togithub.com/luketomlinson) in
[actions/github-script#288,
see https://github.com/actions/github-script/tree/v6.3.0#retries for
more information.

#### New Contributors

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

**Full Changelog**:
actions/github-script@v6.2.0...v6.3.0

</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, click
this checkbox.

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/DeFiCh/metachain).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fuxingloh pushed a commit to levaintech/sticky that referenced this pull request Oct 18, 2022
[![Mend
Renovate](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 | minor | `v6.2.0` -> `v6.3.3` |

---

### Release Notes

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

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

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

#### What's Changed

- Update `@actions/glob` to 0.3.0 by
[@&#8203;nineinchnick](https://togithub.com/nineinchnick) in
[actions/github-script#279

#### New Contributors

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

**Full Changelog**:
actions/github-script@v6.3.2...v6.3.3

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

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

#### What's Changed

- Update [@&#8203;actions/core](https://togithub.com/actions/core) to
1.10.0 by [@&#8203;rentziass](https://togithub.com/rentziass) in
[actions/github-script#295

#### New Contributors

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

**Full Changelog**:
actions/github-script@v6.3.1...v6.3.2

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

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

#### What's Changed

- Fix overriding request options from
[@&#8203;actions/github](https://togithub.com/actions/github) by
[@&#8203;luketomlinson](https://togithub.com/luketomlinson) in
[actions/github-script#293

**Full Changelog**:
actions/github-script@v6.3.0...v6.3.1

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

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

#### What's Changed

- Add retry plugin and related options by
[@&#8203;luketomlinson](https://togithub.com/luketomlinson) in
[actions/github-script#288,
see https://github.com/actions/github-script/tree/v6.3.0#retries for
more information.

#### New Contributors

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

**Full Changelog**:
actions/github-script@v6.2.0...v6.3.0

</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, click
this checkbox.

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/BirthdayResearch/sticky).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Oct 21, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
ootwch pushed a commit to ootwch/wordpress-develop that referenced this pull request Nov 4, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Nov 18, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 074a0ab)
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Nov 18, 2022
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 074a0ab)
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 6, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 6, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 8, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 8, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 8, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Mar 8, 2023
The latest version of the `actions/github-script` action fixes an issue where passing options to the action would remove any default values not passed (see actions/github-script#293).

This also includes updates to other third-party actions, bringing all third-party versions in Core workflows to their latest versions:
- `actions/cache`
- `actions/setup-node`
- `codecov/codecov-action`

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@54373 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current version (6.3.0) is overriding proxy configuration
2 participants