pull/4791/head
filip mertens 5 months ago
parent b5dcbc6ba3
commit deea4edbd2
  1. 2
      apps/remix-ide/src/app/plugins/git.tsx
  2. 6
      libs/remix-ui/git/src/components/panels/githubcredentials.tsx
  3. 1
      libs/remix-ui/git/src/lib/gitactions.ts

@ -19,8 +19,6 @@ const profile = {
export class GitPlugin extends ViewPlugin {
constructor() {
super(profile)

@ -14,11 +14,13 @@ export const GitHubCredentials = () => {
const [githubToken, setGithubToken] = React.useState('')
const [githubUsername, setGithubUsername] = React.useState('')
const [githubEmail, setGithubEmail] = React.useState('')
const [scopeWarning, setScopeWarning] = React.useState(false)
const intl = useIntl()
useEffect(() => {
refresh()
}, [loader.plugin, context.gitHubAccessToken, context.userEmails, context.gitHubUser])
setScopeWarning(!(context.gitHubScopes && context.gitHubScopes.length > 0))
}, [loader.plugin, context.gitHubAccessToken, context.userEmails, context.gitHubUser, context.gitHubScopes])
function handleChangeTokenState(e: string): void {
setGithubToken(e)
@ -76,6 +78,8 @@ export const GitHubCredentials = () => {
<button className="btn btn-danger far fa-trash-alt" onClick={removeToken}>
</button>
</div>
{scopeWarning?
<div className="text-warning">Your GitHub token may not have the correct permissions. Please use the login with GitHub feature.</div>:null}
<hr />
</>
);

@ -544,6 +544,7 @@ export const saveGitHubCredentials = async (credentials: { username: string, ema
verified: null,
visibility: null
}]))
dispatch(setScopes([]))
}
} catch (e) {

Loading…
Cancel
Save