Skip to content

Single Token Input #121

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

Merged
merged 4 commits into from
Nov 27, 2023
Merged

Single Token Input #121

merged 4 commits into from
Nov 27, 2023

Conversation

GrantBirki
Copy link
Member

@GrantBirki GrantBirki commented Nov 27, 2023

Single Token Input

⚠️ This PR will introduce breaking changes

This pull request refactors this Action in the following ways:

  • Removes both input options for passing in a token for authentication and replaces them with just a single option -> github_token. By default, this input option will assume the github.token secret that the workflow run uses. You can optionally overwrite this input option with your own GitHub PAT or the PAT of a bot account

Why?

There is inconsistency in the way this Action runs when a robot user token is not provided. See the example below where no robot token is provided, yet the Action tries to use one anyways:

image

Additionally, it is confusing to the end-user that is installing this workflow in their repository. There should be a single input for the token which this Action should use. That input should default to the permissions scoped to the Actions workflow, then it can be overwritten by the user should they choose to do so. This pull request does exactly that.

@GrantBirki GrantBirki added the enhancement New feature or request label Nov 27, 2023
@GrantBirki GrantBirki changed the title Major Improvements Single Token Input Nov 27, 2023
@GrantBirki GrantBirki self-assigned this Nov 27, 2023
@GrantBirki GrantBirki added the documentation Improvements or additions to documentation label Nov 27, 2023
Co-authored-by: Jason Macgowan <1389531+jasonmacgowan@users.noreply.github.com>
@GrantBirki GrantBirki merged commit 5f97a67 into main Nov 27, 2023
@GrantBirki GrantBirki deleted the major-improvements branch November 27, 2023 20:44
kodiakhq bot referenced this pull request in weareinreach/TransMascFutures Nov 28, 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 |
|---|---|---|---|
| [github/privileged-requester](https://togithub.com/github/privileged-requester) | action | major | `v1.1.0` -> `v2.0.0` |

---

### Release Notes

<details>
<summary>github/privileged-requester (github/privileged-requester)</summary>

### [`v2.0.0`](https://togithub.com/github/privileged-requester/releases/tag/v2.0.0)

[Compare Source](https://togithub.com/github/privileged-requester/compare/v1.1.0...v2.0.0)

#### ⚠️ Breaking Changes ⚠️

The following inputs options are now **deprecated**:

-   `myToken`
-   `robotUserToken`

They are now replaced with just a single input option called [`github_token`](https://togithub.com/github/privileged-requester/blob/020a53bc1a3c4500c216c7c8100a58b0e6d7381e/action.yml#L7-L13). By default, this option will assume the default GitHub Actions token (`${{ github.token }}`) and it will inherit your workflow's permissions. You can optionally overwrite this value with a [GitHub PAT](https://docs.github.com/en/rest/orgs/personal-access-tokens?apiVersion=2022-11-28).

#### What's Changed

-   Single Token Input by [@&#8203;GrantBirki](https://togithub.com/GrantBirki) in [https://github.com/github/privileged-requester/pull/121](https://togithub.com/github/privileged-requester/pull/121)
-   ensure all handles are treated the same (as lowercase) by [@&#8203;GrantBirki](https://togithub.com/GrantBirki) in [https://github.com/github/privileged-requester/pull/122](https://togithub.com/github/privileged-requester/pull/122)
-   improved logging by [@&#8203;GrantBirki](https://togithub.com/GrantBirki) in [https://github.com/github/privileged-requester/pull/123](https://togithub.com/github/privileged-requester/pull/123)
-   Node Updates by [@&#8203;GrantBirki](https://togithub.com/GrantBirki) in [https://github.com/github/privileged-requester/pull/124](https://togithub.com/github/privileged-requester/pull/124)

**Full Changelog**: github/privileged-requester@v1.1.0...v2.0.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 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.

---

 - [ ] 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/weareinreach/GLAAD).



PR-URL: #264
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joe Karow <58997957+JoeKarow@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants