Skip to content

tools, github: Pick authorization prefix based on provided token#23766

Merged
phlax merged 2 commits intoenvoyproxy:mainfrom
dio:use-authorization_header_prefix
Nov 1, 2022
Merged

tools, github: Pick authorization prefix based on provided token#23766
phlax merged 2 commits intoenvoyproxy:mainfrom
dio:use-authorization_header_prefix

Conversation

@dio
Copy link
Copy Markdown
Member

@dio dio commented Oct 31, 2022

Commit Message: Pick the authorization prefix based on the provided token.
Additional Description: Reference: https://github.com/octokit/auth-token.js/blob/902a172693d08de998250bf4d8acb1fdb22377a4/src/with-authorization-prefix.ts#L6-L12
Risk Level: Low
Testing: Manual
Docs Changes: N/A
Release Notes: N/A
Platform-Specific Features: N/A

Signed-off-by: Dhi Aurrahman dio@rockybars.com

@dio
Copy link
Copy Markdown
Member Author

dio commented Oct 31, 2022

Hopefully, this works now.

@dio
Copy link
Copy Markdown
Member Author

dio commented Oct 31, 2022

/assign @phlax

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
@dio
Copy link
Copy Markdown
Member Author

dio commented Nov 1, 2022

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #23766 (comment) was created by @dio.

see: more, trace.

Comment thread tools/github/write_current_source_version.py Outdated
Co-authored-by: phlax <phlax@users.noreply.github.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @dio

im wondering if we need to add some info to the README about using a token to generate the SOURCE_VERSION file

also wondering about error handling - its very common for tokens to expire for example

@dio
Copy link
Copy Markdown
Member Author

dio commented Nov 1, 2022

Sure. Will add. When you do it locally seems like it is rare to experience rate-limited API calls for commit info (e.g. https://api.github.com/repos/envoyproxy/envoy/commits/v1.24.0). But yeah when you do from CI, e.g. GitHub Actions it has a bigger probability. Also, +1 for clean error handling.

@phlax
Copy link
Copy Markdown
Member

phlax commented Nov 1, 2022

cool - i can review any follow ups - ill wait on the backport pr/s until you are happy with this on main

@phlax phlax enabled auto-merge (squash) November 1, 2022 10:31
@phlax phlax merged commit 36fc1cc into envoyproxy:main Nov 1, 2022
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.

2 participants