-
Notifications
You must be signed in to change notification settings - Fork 14
Use GraphQL for GitHub #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
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 hidden or 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 hidden or 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.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Component from '@ember/component'; | ||
import { oneWay } from '@ember/object/computed'; | ||
import { inject } from '@ember/service'; | ||
|
||
export default Component.extend({ | ||
// Services | ||
userSettings: inject(), | ||
|
||
// Properties | ||
token_github_com: oneWay('userSettings.tokens.github_com'), | ||
|
||
init(...args) { | ||
this._super(...args); | ||
}, | ||
actions: { | ||
hideModal() { | ||
this.set('isActive', false); | ||
this.userSettings.setSetting('githubTokenModalSeen', true); | ||
}, | ||
saveSettings() { | ||
this.userSettings.setToken('github_com', this.get('token_github_com')); | ||
this.set('isActive', false); | ||
}, | ||
}, | ||
classNames: ['modal'], | ||
classNameBindings: ['isActive'], | ||
isActive: false, | ||
}); |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Component from '@ember/component'; | ||
import { calculateForegroundColor } from '../utils/label-utils'; | ||
|
||
export default Component.extend({ | ||
init(...args) { | ||
this._super(...args); | ||
}, | ||
didReceiveAttrs() { | ||
this.get('task').labels.map((label) => { | ||
const decoratedLabel = label; | ||
decoratedLabel.fontColor = calculateForegroundColor(label.color); | ||
return decoratedLabel; | ||
}); | ||
}, | ||
didInsertElement() { | ||
this.$().linkify({ | ||
validate: { | ||
url(value) { | ||
return /^(http|ftp)s?:\/\//.test(value); | ||
}, | ||
}, | ||
formatHref(href, type) { | ||
if (type === 'mention') { | ||
return `https://github.com/${ | ||
href.substring(1)}`; | ||
} | ||
return href; | ||
}, | ||
}); | ||
}, | ||
}); |
This file contains hidden or 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 |
---|---|---|
@@ -1,16 +1,9 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default Controller.extend({ | ||
toggleSidenav: true, | ||
actions: { | ||
searchIssues(query) { | ||
this.transitionToRoute('issues', { queryParams: { q: query } }); | ||
showSettingsModal() { | ||
this.set('showModal', true); | ||
}, | ||
toggleSidenav() { | ||
return this.set('toggleSidenav', !this.get('toggleSidenav')); | ||
}, | ||
searchByOrg(org) { | ||
this.send('searchIssues', org.query.q); | ||
} | ||
} | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Controller from '@ember/controller'; | ||
import { inject } from '@ember/service'; | ||
|
||
export default Controller.extend({ | ||
organizations: inject(), | ||
queryParams: ['org'], | ||
}); |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,108 @@ | ||
export default { | ||
coala: { | ||
name: 'coala association e.V.', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'coala', | ||
defaultLabels: [ | ||
'difficulty/newcomer', | ||
], | ||
}, | ||
{ | ||
type: 'gitlab', | ||
identifier: 'coala', | ||
}, | ||
], | ||
}, | ||
'52-north-initiative-for-geospatial-open-source-software-gmbh': { | ||
name: '52° North Initiative for Geospatial Open Source Software GmbH', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: '52North', | ||
}, | ||
], | ||
}, | ||
discourse: { | ||
name: 'Discourse', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'discourse', | ||
}, | ||
], | ||
}, | ||
wikimedia: { | ||
name: 'Wikimedia', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'wikimedia', | ||
}, | ||
], | ||
}, | ||
opensuse: { | ||
name: 'Opensuse', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'opensuse', | ||
}, | ||
], | ||
}, | ||
elm: { | ||
name: 'Elm', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'elm-lang', | ||
}, | ||
], | ||
}, | ||
cadasta: { | ||
name: 'Cadasta', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'cadasta', | ||
}, | ||
], | ||
}, | ||
enketo: { | ||
name: 'Enketo', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'enketo', | ||
}, | ||
], | ||
}, | ||
kobotoolbox: { | ||
name: 'Kobotoolbox', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'kobotoolbox', | ||
}, | ||
], | ||
}, | ||
movingblocks: { | ||
name: 'Movingblocks', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'movingblocks', | ||
}, | ||
], | ||
}, | ||
nexB: { | ||
name: 'Nexb', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'nexB', | ||
}, | ||
], | ||
}, | ||
}; |
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.
I expect the modal to be closed after hitting "Save"
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.
This page is expected to have long list of token info when githlab ce is supported. Which is next phase. Save and close no longer be expected.
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.
Hmm, I don't understand.
I imagine it would be like this:
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.
Surely I should add it now. My thought was "When supporting GitHub CE", there will be > 5 inputs, one for each orgs copy and pasting and switch tab is expected user may want to save and then go back to another github ce website to copy token.
I realize that would be a very rare case that people will have account in those 5 repository. I shouldn't think to far for that. Anyway, it was easier to not do that in the code. 😄 .
I will add that.
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.
Do you mean GitLab CE/GitHub EE/self-hosted? I haven't thought of that :)
But surely it's the same deal, and if there is like >5 inputs, I don't want to hit save after filling each input, I just want to hit it once after filling the token I needed, and then use the app.
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.
An annoying thing about the modal is that when it is opened a second time and then closed, the fetched issue list is lost , requiring a refetch. Is that fixable without much effort?