forked from coala/git-task-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use graphql for GitHub API Add support to coala & 52North Add GitHub token modal Rename implementation of Issues to Tasks Use Bulma for task list Regression: Remove 2017's GSoC Organization Closes coala#34
- Loading branch information
Showing
53 changed files
with
981 additions
and
1,719 deletions.
There are no files selected for viewing
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 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() { | ||
this._super(...arguments); | ||
}, | ||
actions: { | ||
hideModal() { | ||
this.set('isActive', false); | ||
this.userSettings.setSetting('githubTokenModalSeen', true); | ||
}, | ||
saveSettings() { | ||
this.userSettings.setToken('github_com', this.get('token_github_com')); | ||
}, | ||
}, | ||
classNames: ['modal'], | ||
classNameBindings: ['isActive'], | ||
isActive: false | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
init() { | ||
this._super(...arguments); | ||
}, | ||
didInsertElement() { | ||
this.$().linkify({ | ||
validate: { | ||
url: function (value) { | ||
return /^(http|ftp)s?:\/\//.test(value); | ||
} | ||
}, | ||
formatHref: function (href, type) { | ||
if (type === 'mention') { | ||
href = 'https://github.com/' + | ||
href.substring(1); | ||
} | ||
return href; | ||
} | ||
}); | ||
} | ||
}); |
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 |
---|---|---|
@@ -1,16 +1,9 @@ | ||
import Controller from '@ember/controller'; | ||
|
||
export default Controller.extend({ | ||
toggleSidenav: true, | ||
actions: { | ||
searchIssues(query) { | ||
this.transitionToRoute('issues', { queryParams: { q: query } }); | ||
}, | ||
toggleSidenav() { | ||
return this.set('toggleSidenav', !this.get('toggleSidenav')); | ||
}, | ||
searchByOrg(org) { | ||
this.send('searchIssues', org.query.q); | ||
showSettingsModal() { | ||
this.set('showModal', true); | ||
} | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -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 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,24 @@ | ||
export default { | ||
coala: { | ||
name: 'coala association e.V.', | ||
trackers: [ | ||
{ | ||
type: 'github', | ||
identifier: 'coala' | ||
}, | ||
{ | ||
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' | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import {isIterable} from '../utils/commons'; | ||
|
||
export const tasksQuery = `query($searchQuery: String!){ | ||
rateLimit { | ||
remaining | ||
} | ||
search(query: $searchQuery, type: ISSUE, first: 100 ) { | ||
nodes { | ||
type: __typename | ||
... on Issue { | ||
title | ||
author { | ||
url | ||
login | ||
avatarUrl | ||
} | ||
bodyText | ||
url | ||
updatedAt | ||
repository { | ||
nameWithOwner | ||
owner { | ||
avatarUrl | ||
} | ||
url | ||
} | ||
comments { | ||
totalCount | ||
} | ||
} | ||
... on PullRequest { | ||
title | ||
author { | ||
url | ||
login | ||
avatarUrl | ||
} | ||
bodyText | ||
url | ||
updatedAt | ||
repository { | ||
nameWithOwner | ||
owner { | ||
avatarUrl | ||
} | ||
url | ||
} | ||
comments { | ||
totalCount | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
|
||
export const queryBuilder = function queryBuilder({orgs}) { | ||
let queries = ["sort:updated-desc", "state:open"]; | ||
if(isIterable(orgs)) { | ||
queries = orgs.reduce((a,b) => [...a, "user:" + b], queries) | ||
} | ||
return queries.join(" ") | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import moment from 'moment'; | ||
|
||
export function timeAgo(params) { | ||
return moment(params[0]).fromNow(); | ||
} | ||
|
||
export default helper(timeAgo); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { helper } from '@ember/component/helper'; | ||
|
||
function truncateText(params, hash) { | ||
const [ value ] = params; | ||
const { limit } = hash; | ||
let text = ''; | ||
|
||
if (value != null && value.length > 0) { | ||
text = value.substr(0, limit); | ||
|
||
if (value.length > limit) { | ||
text += '...'; | ||
} | ||
} | ||
|
||
return text; | ||
} | ||
|
||
export default helper(truncateText); |
This file was deleted.
Oops, something went wrong.
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.