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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Adopt GitHub fine-graned token #8

Merged
merged 2 commits into from
Dec 21, 2022

Conversation

harumaxy
Copy link
Contributor

@harumaxy harumaxy commented Dec 21, 2022

Hello, I'm also using vercel and trying to include git submodule in build time.

This script is using classic Personal Access Token, but I wanna use new fine-graned PAT because I work for a company and it's more suitable for access management for organization private repo.

It seems to need some fix to URL to use fine-grained token. (like this)
So I added --fg-token flag, and fix code to add oauth2: before token in Github URL if fine-grained token is given.

I would appreciate if you could review 馃檹.

@junhoyeo junhoyeo self-requested a review December 21, 2022 08:46
@junhoyeo
Copy link
Owner

Super! I'm out right now, will check in a few hours!

@@ -6,23 +6,24 @@ import * as zx from 'zx';
import { insideDir } from '../utils/filesystem.js';
import { Submodule } from '../utils/submodules.js';

const convertToAuthURL = (url: string, githubToken: string): string => {
const convertToAuthURL = (url: string, githubToken: string, isFineGrained: boolean): string => {
Copy link
Owner

@junhoyeo junhoyeo Dec 21, 2022

Choose a reason for hiding this comment

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

Nice! Would love to rewrite this by making the params into an single object soon.

Copy link
Owner

@junhoyeo junhoyeo left a comment

Choose a reason for hiding this comment

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

LGTM

@junhoyeo junhoyeo changed the title Adopt github fine-graned token [cli] Adopt github fine-graned token Dec 21, 2022
@junhoyeo junhoyeo changed the title [cli] Adopt github fine-graned token [cli] Adopt GitHub fine-graned token Dec 21, 2022
@junhoyeo junhoyeo merged commit 33c0511 into junhoyeo:main Dec 21, 2022
@junhoyeo
Copy link
Owner

@harumaxy Just released 1.0.7! Sorry to keep you waiting. 馃殌

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.

None yet

2 participants