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

When using the REST API, send "token" authorization instead of "bearer" #50

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

weierophinney
Copy link
Member

Since our GITHUB_TOKEN is a personal access token, it can be used as either an OAuth (bearer) or PAT (token) type for purposes of authorization. However, OAuth requests from actions do not trigger workflow events (see https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token).

This patch updates the three different API calls we currently perform (create release, set default branch, create pull request) to use the "token" type for authorization.

…bearer"

Since our GITHUB_TOKEN is a personal access token, it can be used as
either an OAuth (bearer) or PAT (token) type for purposes of
authorization. However, OAuth requests from actions do not trigger
workflow events (see https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token).

This patch updates the three different API calls we currently perform
(create release, set default branch, create pull request) to use the
"token" type for authorization.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
@weierophinney weierophinney added this to the 1.2.3 milestone Aug 13, 2020
@Ocramius Ocramius self-assigned this Aug 13, 2020
@Ocramius Ocramius added the Bug Something isn't working label Aug 13, 2020
@Ocramius
Copy link
Member

Let's try it! 🚢

@Ocramius Ocramius merged commit 881d4a4 into laminas:1.2.x Aug 13, 2020
@weierophinney weierophinney deleted the hotfix/personal-access-token branch August 13, 2020 16:11
weierophinney added a commit that referenced this pull request Aug 13, 2020
Adds an entry for #50 in the Fixed section, and sets the release date.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
weierophinney added a commit that referenced this pull request Aug 14, 2020
Adds an entry for #50 in the Fixed section, and sets the release date.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants