pull/5370/head
bunsenstraat 3 months ago
parent 8b85f9f5d2
commit 8d8a6ac232
  1. 17
      libs/remix-git/src/isogit.ts
  2. 2
      libs/remix-ui/app/src/lib/remix-app/actions/app.ts
  3. 2
      libs/remix-ui/app/src/lib/remix-app/interface/index.ts
  4. 2
      libs/remix-ui/app/src/lib/remix-app/state/app.ts
  5. 1
      libs/remix-ui/git/src/lib/gitactions.ts
  6. 3
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  7. 2
      libs/remix-ui/workspace/src/lib/types/index.ts

@ -161,7 +161,7 @@ const getAuthor = async (input, plugin: any) => {
}
const getGitHubUser = async (input: { token: string }): Promise<{
const getGitHubUser = async(input: { token: string }): Promise<{
user: GitHubUser,
emails: userEmails,
scopes: string[]
@ -171,17 +171,22 @@ const getGitHubUser = async (input: { token: string }): Promise<{
auth: input.token
})
const user = await octokit.request('GET /user')
const user = await octokit.request('GET /user', {
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
const emails = await octokit.request('GET /user/emails')
const scopes = user.headers['x-oauth-scopes'] || ''
console.log('USER', user.data)
return {
user: user.data,
user: {
...user.data, isConnected:
user.data.login !== undefined && user.data.login !== null && user.data.login !== ''
},
emails: emails.data,
scopes: scopes && scopes.split(',')
scopes: scopes && scopes.split(',').map(scope => scope.trim())
}
} catch (e) {
return null

@ -1,4 +1,4 @@
import { GitHubUser } from '@remix-ui/git';
import { GitHubUser } from '@remix-api';
import { AppModal } from '../interface'
type ActionMap<M extends { [index: string]: any }> = {

@ -1,4 +1,4 @@
import { GitHubUser } from '@remix-ui/git'
import { GitHubUser } from '@remix-api'
import { ModalTypes } from '../types'
export type ValidationResult = {

@ -1,4 +1,4 @@
import { GitHubUser } from "@remix-ui/git";
import { GitHubUser } from "@remix-api";
import { AppState } from "../interface";
export const appInitialState: AppState = {

@ -8,7 +8,6 @@ import { ModalTypes, appActionTypes, AppAction } from "@remix-ui/app";
import { sendToMatomo, setFileDecorators } from "./pluginActions";
import { Plugin } from "@remixproject/engine";
import { addInputType, branch, branchDifference, checkoutInputType, cloneInputType, commitChange, CustomRemixApi, fetchInputType, GitHubUser, pullInputType, pushInputType, remote, rmInputType, userEmails } from "@remix-api";
import { app } from "electron";
export const fileStatuses = [
["new,untracked", 0, 2, 0], // new, untracked

@ -17,7 +17,8 @@ import { customAction } from '@remixproject/plugin-api'
import { AppContext, appPlatformTypes, platformContext } from '@remix-ui/app'
import { ElectronMenu } from './components/electron-menu'
import { ElectronWorkspaceName } from './components/electron-workspace-name'
import { branch, GitHubUser, gitUIPanels, userEmails } from '@remix-ui/git'
import { branch } from '@remix-api'
import { gitUIPanels } from '@remix-ui/git'
const _paq = (window._paq = window._paq || [])

@ -6,7 +6,7 @@ import { RemixAppManager } from 'libs/remix-ui/plugin-manager/src/types'
import { ViewPlugin } from '@remixproject/engine-web'
import { appPlatformTypes } from '@remix-ui/app'
import { Placement } from 'react-bootstrap/esm/Overlay'
import { branch, GitHubUser } from '@remix-ui/git'
import { branch } from '@remix-api'
export type action = { name: string, type?: Array<WorkspaceElement>, path?: string[], extension?: string[], pattern?: string[], id: string, multiselect: boolean, label: string, sticky?: boolean, group: number, platform?: appPlatformTypes }
export interface JSONStandardInput {

Loading…
Cancel
Save