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
# Using the py-oauth2 library | |
# http://github.com/liluo/py-oauth2 | |
import oauth2 | |
import json | |
SITE = "https://taskrabbitdev.com" | |
AUTHORIZE_URL = "https://taskrabbitdev.com/api/authorize" | |
TOKEN_URL = "https://taskrabbitdev.com/api/oauth/token" | |
HEADER_FORMAT = "OAuth %s" | |
APPLICATION_HEADER = "X-Client-Application" |
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
class ListResource(BaseResource): | |
def get(self, parent_id=None): | |
resource_name = self.resource_manager.list_resource_name | |
model_class = self.resource_manager.model_class | |
list_field = self.resource_manager.list_field | |
ids = self._get_ids_from_query_params() | |
models = [] |
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
(dev): git pull > dev and origin/dev are in sync | |
(dev): git branch feature-name > dev and feature-name are in sync | |
(dev): git checkout feature-name | |
(feature-name): ....make your changes... | |
(feature-name): git commit -m "Great message." > dev and feature-name are not in sync. | |
(feature-name): git checkout dev | |
...evan makes changes and pushes them to origin/dev | |
(dev): git pull > origin/dev and dev are in sync, but feature-name is not. | |
(dev): git checkout feature-name | |
(feature-name): git rebase dev > you'll have to resolve conflicts. |
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
const fs = require('fs'); | |
const flatten = arrays => [].concat.apply([], arrays); | |
const isFile = err => err && err.code === 'ENOTDIR'; | |
const getChildPaths = (dir, filenames) => filenames.map(f => dir + '/' + f); | |
const readFiles = (reader, path) => { | |
return new Promise((resolve, reject) => { | |
reader.readdir(path, (err, filenames) => { | |
resolve({ path, filenames, err }); |
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
const state = { | |
status: { | |
workCompleted: true, | |
submitted: true, | |
reviewed: false, | |
reviewRead: false, | |
feedbackCompleted: false | |
}, | |
timestamps: { | |
workCompleted: <TS>, |
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
Github API: https://developer.github.com/v3/pulls/#list-pull-requests | |
1. Get all Closed Pull Requests updated during date period [requires paging] | |
2. Filter by label !== “test-exempt” [using the Issues API] | |
3. Filter by merged | |
4. == TOTAL | |
5. For each PR | |
a. Get all files | |
b. Filter by at least 1 filename including a test string | |
c. == TESTED |