This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
112 creating teams #120
Merged
Merged
112 creating teams #120
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ef3cede
#112 - initial team auto-creation
natoverse 015109e
#112 - moved team creation to separate middleware
natoverse ce528ef
#112 - fixed mock passport user to match mock data
natoverse b8d04d7
#112 - fixed node start for new app.js location with babel
natoverse aea37ab
#112 - removed start/halt server from itest runs
natoverse bac20bb
#112 - added mock for createTeam
natoverse e66fd1e
#112 - fixed link creation logic to use correct user
natoverse ccfd20f
#112 - updated itests to use mock user with admin
natoverse a524737
Merge branch 'master' into 112-creating-teams
natoverse dee6158
#112 - removed temporary 'auth' middleware
natoverse 39d460d
#112 - fixed auth promise
natoverse 5271fcf
#112 - fixed mock passport so client id/key aren't required
natoverse 78ffe3b
#112 - made mock user configurable
natoverse c1b7be9
#112 - updated readme for new auth + mock params
natoverse c31bf45
#112 - fixed mock team test
natoverse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ convertGithubRepo = (repo) => { | |
return { | ||
'id': repo.id, | ||
'name': repo.name, | ||
'full_name': repo.full_name, | ||
'description': repo.description, | ||
'public': !repo.private | ||
}; | ||
|
@@ -17,6 +18,24 @@ module.exports = { | |
getGithubRepos () { | ||
let args = provider.getDefaultListArgs(); | ||
return provider.github.getRepos(args).then(repos => repos.map(repo => convertGithubRepo(repo))); | ||
}, | ||
|
||
getRepoById(repoId) { | ||
|
||
return new Promise((resolve, reject) => { | ||
|
||
this.getGithubRepos().then((repos) => { | ||
|
||
//repoId is coming in as a string, hence coercion | ||
let id = parseInt(repoId), | ||
repo = repos.find(r => r.id === id); | ||
|
||
resolve(repo); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this instead of the github |
||
|
||
}); | ||
|
||
}); | ||
|
||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nbd, but we can use template strings with babel: https://babeljs.io/docs/learn-es6/#template-strings