Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e6a498c7
Unverified
Commit
e6a498c7
authored
Apr 30, 2019
by
yann300
Committed by
GitHub
Apr 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1887 from ethereum/githubimport
improving github import
parents
3fb0fafb
39fe2b15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
compiler-imports.js
src/app/compiler/compiler-imports.js
+12
-2
modal-dialog-custom-styles.js
src/app/ui/styles/modal-dialog-custom-styles.js
+1
-1
No files found.
src/app/compiler/compiler-imports.js
View file @
e6a498c7
...
@@ -11,10 +11,20 @@ module.exports = class CompilerImports {
...
@@ -11,10 +11,20 @@ module.exports = class CompilerImports {
}
}
handleGithubCall
(
root
,
path
,
cb
)
{
handleGithubCall
(
root
,
path
,
cb
)
{
var
accessToken
=
this
.
githubAccessToken
()
?
'?access_token='
+
this
.
githubAccessToken
()
:
''
let
param
=
'?'
param
+=
this
.
githubAccessToken
()
?
'access_token='
+
this
.
githubAccessToken
()
:
''
const
regex
=
path
.
match
(
/blob
\/([^/]
+
)\/(
.*
)
/
)
if
(
regex
)
{
// if we have /blob/master/+path we extract the branch name "master" and add it as a parameter to the github api
// the ref can be branch name, tag, commit id
const
reference
=
regex
[
1
]
param
+=
'ref='
+
reference
path
=
path
.
replace
(
`blob/
${
reference
}
/`
,
''
)
}
return
request
.
get
(
return
request
.
get
(
{
{
url
:
'https://api.github.com/repos/'
+
root
+
'/contents/'
+
path
+
accessToken
,
url
:
'https://api.github.com/repos/'
+
root
+
'/contents/'
+
path
+
param
,
json
:
true
json
:
true
},
},
(
err
,
r
,
data
)
=>
{
(
err
,
r
,
data
)
=>
{
...
...
src/app/ui/styles/modal-dialog-custom-styles.js
View file @
e6a498c7
...
@@ -2,7 +2,7 @@ var csjs = require('csjs-inject')
...
@@ -2,7 +2,7 @@ var csjs = require('csjs-inject')
var
css
=
csjs
`
var
css
=
csjs
`
.prompt_text {
.prompt_text {
width:
300px
;
width:
100%
;
}
}
`
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment