Add workflow scope to GitHub authentication URL (#4439)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Robert Brennan 2024-10-16 14:41:46 -04:00 committed by GitHub
parent e12bff5189
commit 226ea545fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ export const clientLoader = async ({ request }: ClientLoaderFunctionArgs) => {
const clientId = import.meta.env.VITE_GITHUB_CLIENT_ID;
const requestUrl = new URL(request.url);
const redirectUri = `${requestUrl.origin}/oauth/github/callback`;
const githubAuthUrl = `https://github.com/login/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=repo,user`;
const githubAuthUrl = `https://github.com/login/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=repo,user,workflow`;
return json({ repositories, githubAuthUrl });
};