Skip to content

Commit 7572626

Browse files
committed
Use graphql for GitHub
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 Repository and User Model Closes #34
1 parent c766e16 commit 7572626

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1108
-1850
lines changed

app/adapters/application.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/adapters/issue.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/adapters/repository.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/components/search-card.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/components/settings-modal.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Component from '@ember/component';
2+
import {oneWay} from '@ember/object/computed';
3+
import {inject} from '@ember/service';
4+
5+
export default Component.extend({
6+
// Services
7+
userSettings: inject(),
8+
9+
// Properties
10+
token_github_com: oneWay('userSettings.tokens.github_com'),
11+
12+
init() {
13+
this._super(...arguments);
14+
},
15+
actions: {
16+
hideModal() {
17+
this.set('isActive', false);
18+
this.userSettings.setSetting('githubTokenModalSeen', true);
19+
},
20+
saveSettings() {
21+
this.userSettings.setToken('github_com', this.get('token_github_com'));
22+
this.set('isActive', false);
23+
},
24+
},
25+
classNames: ['modal'],
26+
classNameBindings: ['isActive'],
27+
isActive: false,
28+
});

app/components/task-item.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Component from '@ember/component';
2+
3+
export default Component.extend({
4+
init() {
5+
this._super(...arguments);
6+
},
7+
didInsertElement() {
8+
this.$().linkify({
9+
validate: {
10+
url: function (value) {
11+
return /^(http|ftp)s?:\/\//.test(value);
12+
},
13+
},
14+
formatHref: function (href, type) {
15+
if (type === 'mention') {
16+
href = 'https://github.com/' +
17+
href.substring(1);
18+
}
19+
return href;
20+
},
21+
});
22+
},
23+
});

app/controllers/application.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import Controller from '@ember/controller';
22

33
export default Controller.extend({
4-
toggleSidenav: true,
54
actions: {
6-
searchIssues(query) {
7-
this.transitionToRoute('issues', { queryParams: { q: query } });
5+
showSettingsModal() {
6+
this.set('showModal', true);
87
},
9-
toggleSidenav() {
10-
return this.set('toggleSidenav', !this.get('toggleSidenav'));
11-
},
12-
searchByOrg(org) {
13-
this.send('searchIssues', org.query.q);
14-
}
15-
}
8+
},
169
});

app/controllers/issues.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/controllers/tasks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Controller from '@ember/controller';
2+
import {inject} from '@ember/service';
3+
4+
export default Controller.extend({
5+
organizations: inject(),
6+
queryParams: ['org'],
7+
});

app/data/organizations.js

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
export default {
2+
coala: {
3+
name: 'coala association e.V.',
4+
trackers: [
5+
{
6+
type: 'github',
7+
identifier: 'coala',
8+
},
9+
{
10+
type: 'gitlab',
11+
identifier: 'coala',
12+
},
13+
],
14+
},
15+
'52-north-initiative-for-geospatial-open-source-software-gmbh': {
16+
name: '52° North Initiative for Geospatial Open Source Software GmbH',
17+
trackers: [
18+
{
19+
type: 'github',
20+
identifier: '52North',
21+
},
22+
],
23+
},
24+
'discourse': {
25+
name: 'Discourse',
26+
trackers: [
27+
{
28+
type: 'github',
29+
identifier: 'discourse',
30+
},
31+
],
32+
},
33+
'wikimedia': {
34+
name: 'Wikimedia',
35+
trackers: [
36+
{
37+
type: 'github',
38+
identifier: 'wikimedia',
39+
},
40+
],
41+
},
42+
'opensuse': {
43+
name: 'Opensuse',
44+
trackers: [
45+
{
46+
type: 'github',
47+
identifier: 'opensuse',
48+
},
49+
],
50+
},
51+
'elm': {
52+
name: 'Elm',
53+
trackers: [
54+
{
55+
type: 'github',
56+
identifier: 'elm-lang',
57+
},
58+
],
59+
},
60+
'cadasta': {
61+
name: 'Cadasta',
62+
trackers: [
63+
{
64+
type: 'github',
65+
identifier: 'cadasta',
66+
},
67+
],
68+
},
69+
'enketo': {
70+
name: 'Enketo',
71+
trackers: [
72+
{
73+
type: 'github',
74+
identifier: 'enketo',
75+
},
76+
],
77+
},
78+
'kobotoolbox': {
79+
name: 'Kobotoolbox',
80+
trackers: [
81+
{
82+
type: 'github',
83+
identifier: 'kobotoolbox',
84+
},
85+
],
86+
},
87+
'movingblocks': {
88+
name: 'Movingblocks',
89+
trackers: [
90+
{
91+
type: 'github',
92+
identifier: 'movingblocks',
93+
},
94+
],
95+
},
96+
'nexB': {
97+
name: 'Nexb',
98+
trackers: [
99+
{
100+
type: 'github',
101+
identifier: 'nexB',
102+
},
103+
],
104+
},
105+
};

0 commit comments

Comments
 (0)