Skip to content

Use GraphQL for GitHub - 2 #64

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

Merged
merged 2 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ typings/
# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

Expand Down Expand Up @@ -222,7 +228,8 @@ flycheck_*.el
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Expand Down Expand Up @@ -260,9 +267,16 @@ tags
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-debug/
cmake-build-release/
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml
Expand Down Expand Up @@ -419,6 +433,9 @@ local.properties
# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
Expand Down Expand Up @@ -451,3 +468,6 @@ cscope.po.out
*.patch
*.orig
*.diff

# Pytest profile files
prof/
12 changes: 0 additions & 12 deletions app/adapters/application.js

This file was deleted.

25 changes: 0 additions & 25 deletions app/adapters/issue.js

This file was deleted.

14 changes: 0 additions & 14 deletions app/adapters/repository.js

This file was deleted.

12 changes: 0 additions & 12 deletions app/components/search-card.js

This file was deleted.

28 changes: 28 additions & 0 deletions app/components/settings-modal.js
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,
});
31 changes: 31 additions & 0 deletions app/components/task-item.js
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;
},
});
},
});
13 changes: 3 additions & 10 deletions app/controllers/application.js
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);
}
}
},
});
26 changes: 0 additions & 26 deletions app/controllers/issues.js

This file was deleted.

7 changes: 7 additions & 0 deletions app/controllers/tasks.js
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'],
});
108 changes: 108 additions & 0 deletions app/data/organizations.js
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',
},
],
},
};
Loading