Why request access to private repos?

HEAD
e0be1e3remove agent-browser skill to prevent confusion
This post might have stale content, as HEAD is 10 commits ahead.

I'm concerned about requesting access to private repos. They are set as private for a reason. Mind explaining why that choice?

Avatar of julianbenegas
Julian Benegas
commented

makes sense. can the repo scope be requested for specific repos?

Avatar of julianbenegas
Julian Benegas
commented

let's improve this. let's actually only ask for the additional scope only if the user wants to enter "build" mode. something like show an alert icon next to "build" and a tooltip showing "additonal scope needed" or something like that.

but first we need to figure out if it's possible to be dynamic as to the scopes we ask each user?

Avatar of julianbenegas
Julian Benegas
commented

brilliant. that would be awesome

Avatar of julianbenegas
Julian Benegas
commented

some notes:

  1. seeing the warning even in "ask" mode
  2. should use our Tooltip component, not HTML's "title"
  3. got some feedback from vercel review:
vercel bot reviewed 1 hour ago
apps/web/app/[owner]/[repo]/[postNumber]/post-composer.tsx
        ([moderateResult, scopeResult]) => {
          setCanModerate(moderateResult)
          setHasRepoScope(scopeResult)
        }
Contributor
@vercel
vercel bot
1 hour ago
After OAuth scope request redirects back, hasRepoScope state doesn't refresh because useEffect dependency array doesn't include session data

Fix on Vercel
@julianbenegas	Reply...
apps/web/app/[owner]/[repo]/repo-content.tsx
      ([moderateResult, scopeResult]) => {
        setCanModerate(moderateResult)
        setHasRepoScope(scopeResult)
      }
Contributor
@vercel
vercel bot
1 hour ago
After OAuth scope request redirects back, the hasRepoScope state doesn't refresh because the useEffect dependencies haven't changed after session update

Fix on Vercel
@julianbenegas	Reply...
apps/web/components/composer.tsx
                      ? "Ask mode (Shift+Tab to switch)"
                      ? hasRepoScope
                        ? "Ask mode (Shift+Tab to switch)"
                        : "Build mode requires additional GitHub permissions"
Contributor
@vercel
vercel bot
1 hour ago
Warning icon for missing repo scope only shows when mode is "ask", not when mode is "build" with revoked scope

Fix on Vercel
@julianbenegas	Reply...
apps/web/app/[owner]/[repo]/repo-permissions-context.tsx
        setCanModerate(result)
    Promise.all([checkCanModerate(owner, repo), checkHasRepoScope()])
      .then(([moderateResult, scopeResult]) => {
        setCanModerate(moderateResult)
Contributor
@vercel
vercel bot
1 hour ago
Unstable object reference in useEffect dependency array causes unnecessary re-renders after OAuth redirect instead of tracking actual user identity changes

Fix on Vercel
Avatar of julianbenegas
Julian Benegas
commented

woah, you created the PR earlier. so weird... can u try again? maybe it was due to me testing the new thing and overriding the scopes? i've signed out and in again. try it now please

Avatar of julianbenegas
Julian Benegas
commented

i still see the warning icon in "ask" mode. pls fix. also merge with main cause i pushed some changes there. also make the mode be stored in sessionStorage instead of localStorage. so it gets stale. the mode should stick the my prev comment if inside a post, though.

Avatar of julianbenegas
Julian Benegas
commented

nice! but i don't dig the fact that it takes me straight to the github screen when clicking on "ask". imagine i don't know that there's a build mode and i'm suddently going there? maybe let the user go to build mode, show a warning in build mode that can be clicked (which doesn't interfere with the mode; anotehr button!), and disable the button


END OF POST

Why request access to private repos? — basehub-ai/forums