tests passing
This commit is contained in:
committed by
mrugesh mohapatra
parent
e2c57be829
commit
0ba69b4d5f
@ -1,166 +1,31 @@
|
|||||||
const debug = require("debug")("probot:presolver");
|
const debug = require('debug')('probot:presolver')
|
||||||
const Presolver = require('./lib/presolver')
|
const Presolver = require('./lib/presolver')
|
||||||
/*const Presolver = {
|
|
||||||
(github, { owner, repo, logger = console, ...config }) {
|
|
||||||
//constructor(github, { owner, repo, logger = console, ...config }) {
|
|
||||||
this.github = github;
|
|
||||||
this.logger = logger;
|
|
||||||
this.config = Object.assign({}, {
|
|
||||||
owner,
|
|
||||||
repo
|
|
||||||
});
|
|
||||||
this.pullRequest = {};
|
|
||||||
//}
|
|
||||||
|
|
||||||
/*static get STATE() {
|
async function probotPlugin (robot) {
|
||||||
return Object.freeze({
|
|
||||||
CLASH: 'clashing'
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
async function probotPlugin(robot) {
|
|
||||||
const events = [
|
const events = [
|
||||||
"pull_request.opened",
|
'pull_request.opened',
|
||||||
"pull_request.edited",
|
'pull_request.edited',
|
||||||
"pull_request.synchronize",
|
'pull_request.synchronize',
|
||||||
"pull_request.reopened",
|
'pull_request.reopened',
|
||||||
"pull_request.labeled"
|
'pull_request.labeled'
|
||||||
];
|
]
|
||||||
|
|
||||||
robot.on(events, presolve.bind(null, robot));
|
robot.on(events, presolve.bind(null, robot))
|
||||||
}
|
|
||||||
/*async function _getClashingRanges(context, pullRequest) {
|
|
||||||
const repo = pullRequest.base.repo;
|
|
||||||
//console.log(pullRequest)
|
|
||||||
const owner = repo.owner;
|
|
||||||
const number = pullRequest.number;
|
|
||||||
console.log(context)
|
|
||||||
const prs = (await context.github.pullRequests.get({ owner, repo }))
|
|
||||||
.data || [];
|
|
||||||
prs.forEach(function(pr){
|
|
||||||
const files = pr.files()
|
|
||||||
console.log(files)
|
|
||||||
})
|
|
||||||
}*/
|
|
||||||
/*async function presolver(context, pullRequest) {
|
|
||||||
//Object.assign(this.pullRequest, pullRequest);
|
|
||||||
//const { owner, repo } = this.config;
|
|
||||||
//const number = this.pullRequest.number;
|
|
||||||
|
|
||||||
const state = await _getClashingRanges(context, pullRequest);
|
|
||||||
|
|
||||||
}*/
|
|
||||||
async function presolve(app, context) {
|
|
||||||
const presolver = forRepository(context);
|
|
||||||
const pullRequest = getPullRequest(context);
|
|
||||||
return presolver.presolve(pullRequest);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function forRepository(context) {
|
async function presolve (app, context) {
|
||||||
const config = Object.assign({}, context.repo({ logger: debug }));
|
const presolver = forRepository(context)
|
||||||
return new Presolver(context, config);
|
const pullRequest = getPullRequest(context)
|
||||||
|
return presolver.presolve(pullRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPullRequest(context) {
|
function forRepository (context) {
|
||||||
return context.payload.pull_request || context.payload.review.pull_request;
|
const config = Object.assign({}, context.repo({ logger: debug }))
|
||||||
|
return new Presolver(context, config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPullRequest (context) {
|
||||||
|
return context.payload.pull_request || context.payload.review.pull_request
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = probotPlugin;
|
module.exports = probotPlugin
|
||||||
/*module.exports = async app => {
|
|
||||||
// Your code here
|
|
||||||
app.log('Yay, the app was loaded!')
|
|
||||||
|
|
||||||
app.on('pull_request.opened', async githubcontext => {
|
|
||||||
//console.log(githubcontext)
|
|
||||||
const prContext = getPullRequest(githubcontext);
|
|
||||||
//console.log(prContext);
|
|
||||||
//const config = //Object.assign({}, githubcontext.repo({})
|
|
||||||
//);
|
|
||||||
//const context = prContext.github;
|
|
||||||
//console.log(context)
|
|
||||||
//constructor(github, { owner, repo, logger = console, ...config }) {
|
|
||||||
|
|
||||||
//const prNumber = context.payload.pull_request.number;
|
|
||||||
|
|
||||||
const { title, head, number, id } = prContext;*/
|
|
||||||
//const owner = context.owner;
|
|
||||||
//const repo = context.repo;
|
|
||||||
/*const reviews =
|
|
||||||
(await context.github.pullRequests.getReviews({ owner, repo, number }))
|
|
||||||
.data || [];
|
|
||||||
|
|
||||||
const uniqueReviews = reviews
|
|
||||||
.filter(review => review.commit_id === sha)
|
|
||||||
.reduce((reviewObj, review) => {
|
|
||||||
if (
|
|
||||||
reviewObj[review.user.id] === null ||
|
|
||||||
reviewObj[review.user.id] === undefined
|
|
||||||
) {
|
|
||||||
reviewObj[review.user.id] = {
|
|
||||||
state: review.state,
|
|
||||||
submitted_at: review.submitted_at
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
const a = new Date(
|
|
||||||
reviewObj[review.user.id]["submitted_at"]
|
|
||||||
).getTime();
|
|
||||||
const b = new Date(review.submitted_at).getTime();
|
|
||||||
if (a < b) {
|
|
||||||
reviewObj[review.user.id] = {
|
|
||||||
state: review.state,
|
|
||||||
submitted_at: review.submitted_at
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return reviewObj;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
return Object.values(uniqueReviews);
|
|
||||||
}*/
|
|
||||||
//const params =
|
|
||||||
/* const commit_id = head.sha;
|
|
||||||
const body = 'probot comment test';
|
|
||||||
const filepath = './app.js'
|
|
||||||
const pos = 4;
|
|
||||||
const event = 'COMMENT'
|
|
||||||
const comments = {
|
|
||||||
path: './app.js',
|
|
||||||
position: 4,
|
|
||||||
body: 'probot test'
|
|
||||||
}
|
|
||||||
const path =
|
|
||||||
//comments[].path =
|
|
||||||
filepath;
|
|
||||||
const position =
|
|
||||||
//comments[].path =
|
|
||||||
pos;
|
|
||||||
const reviewers = ['tbushman']*/
|
|
||||||
/*return await context.github.pullRequests.createReview({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
number,
|
|
||||||
commit_id,
|
|
||||||
body,
|
|
||||||
event,
|
|
||||||
comments
|
|
||||||
|
|
||||||
})*/
|
|
||||||
/* const issueComment = githubcontext.issue({ body: 'probot label test' })
|
|
||||||
return githubcontext.github.issues.createComment(issueComment)
|
|
||||||
//return await githubcontext.github.pullRequests.createReviewRequest({owner, repo, number, reviewers})
|
|
||||||
})*/
|
|
||||||
|
|
||||||
// For more information on building apps:
|
|
||||||
// https://probot.github.io/docs/
|
|
||||||
|
|
||||||
// To get your app running against GitHub, see:
|
|
||||||
// https://probot.github.io/docs/development/
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
labelPRConflict: {
|
labelPRConflict: {
|
||||||
name: "PR: potential-conflict",
|
name: 'PR: potential-conflict',
|
||||||
color: "c2e0c6"
|
color: 'c2e0c6'
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
@ -1,107 +1,95 @@
|
|||||||
class Presolver {
|
class Presolver {
|
||||||
constructor(context, { owner, repo, logger = console, ...config }) {
|
constructor (context, { owner, repo, logger = console, ...config }) {
|
||||||
this.context = context;
|
this.context = context
|
||||||
this.github = context.github;
|
this.github = context.github
|
||||||
this.logger = logger;
|
this.logger = logger
|
||||||
this.config = Object.assign({}, require("./defaults"), config || {}, {
|
this.config = Object.assign({}, require('./defaults'), config || {}, {
|
||||||
owner,
|
owner,
|
||||||
repo
|
repo
|
||||||
});
|
})
|
||||||
this.pullRequest = {};
|
this.pullRequest = {}
|
||||||
this.conflictingFiles = [];
|
this.conflictingFiles = []
|
||||||
}
|
}
|
||||||
|
|
||||||
async presolve(pullRequest) {
|
async presolve (pullRequest) {
|
||||||
Object.assign(this.pullRequest, pullRequest);
|
Object.assign(this.pullRequest, pullRequest)
|
||||||
const { owner, repo } = this.config;
|
await this._ensurePresolverLabelExists()
|
||||||
const number = this.pullRequest.number;
|
await this._getState()
|
||||||
await this._ensurePresolverLabelExists();
|
const labelObj = this.config.labelPRConflict
|
||||||
const state = await this._getState();
|
|
||||||
if (this.conflictingFiles.length) {
|
if (this.conflictingFiles.length) {
|
||||||
await this._addLabel();
|
await this._addLabel(labelObj)
|
||||||
}
|
}
|
||||||
/*switch(state) {
|
|
||||||
case Presolver.STATE.CONFLICT:
|
|
||||||
case Presolver.STATE.NOCONFLICT:
|
|
||||||
default:
|
|
||||||
throw new Error('Undefined state');*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
async _getState() {
|
|
||||||
const files = await this.github.pullRequests.getFiles(this.context.issue());
|
async _getState () {
|
||||||
console.log(files)
|
// console.log(this.context.issue())
|
||||||
const {owner, repo} = this.config;
|
const files = await this.github.pullRequests.getFiles(this.context.issue())
|
||||||
|
// console.log(files)
|
||||||
|
const {owner, repo} = this.config
|
||||||
const prs = await this.github.pullRequests.getAll({ owner, repo })
|
const prs = await this.github.pullRequests.getAll({ owner, repo })
|
||||||
.data || [];
|
.data || []
|
||||||
//let state;
|
// console.log(prs)
|
||||||
console.log(prs)
|
await this._getConflictingFiles(prs, files)
|
||||||
await this._getConflictingFiles(prs, files);
|
|
||||||
/*if (conflictingFiles.length) {
|
|
||||||
return Presolver.STATE.CONFLICT;
|
|
||||||
} else {
|
|
||||||
return Presolver.STATE.NOCONFLICT;
|
|
||||||
}*/
|
|
||||||
return;
|
|
||||||
// ... this.pullRequest.
|
|
||||||
/*
|
|
||||||
const prs = (await context.github.pullRequests.get({ owner, repo }))
|
|
||||||
.data || [];
|
|
||||||
prs.forEach(function(pr){
|
|
||||||
const files = pr.files()
|
|
||||||
console.log(files)
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _getConflictingFiles(prs, files) {
|
async _getConflictingFiles (prs, files) {
|
||||||
prs.forEach(function(pr){
|
const {owner, repo} = this.config
|
||||||
var prFiles = pr.getFiles();
|
const github = this.github
|
||||||
prFiles.data.forEach(function(file){
|
const conflictingFiles = this.conflictingFiles
|
||||||
files.data.forEach(function(f){
|
// console.log(prs, files)
|
||||||
console.log(f, file)
|
prs.forEach((pr) => {
|
||||||
|
const prIssue = {
|
||||||
|
number: pr.number,
|
||||||
|
owner: owner,
|
||||||
|
repo: repo
|
||||||
|
}
|
||||||
|
var prFiles = github.pullRequests.getFiles(prIssue)
|
||||||
|
prFiles.data.forEach((file) => {
|
||||||
|
files.data.forEach((f) => {
|
||||||
|
// console.log(f, file)
|
||||||
if (f.filename === file.filename) {
|
if (f.filename === file.filename) {
|
||||||
this.conflictingFiles.push(file.filename)
|
conflictingFiles.push(file.filename)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async _ensurePresolverLabelExists() {
|
async _ensurePresolverLabelExists () {
|
||||||
const label = this.config.labelPRConflict;
|
const label = this.config.labelPRConflict
|
||||||
await this._createLabel(label);
|
await this._createLabel(label)
|
||||||
}
|
}
|
||||||
|
|
||||||
async _createLabel(labelObj) {
|
async _createLabel (labelObj) {
|
||||||
const { owner, repo } = this.config;
|
const { owner, repo } = this.config
|
||||||
|
|
||||||
return this.github.issues
|
return this.github.issues
|
||||||
.getLabels({ owner, repo, name: labelObj.name })
|
.getLabels({ owner, repo, name: labelObj.name })
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log(labelObj)
|
// console.log(labelObj)
|
||||||
return this.github.issues.createLabel({
|
return this.github.issues.createLabel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
name: labelObj.name,
|
name: labelObj.name,
|
||||||
color: labelObj.color
|
color: labelObj.color
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
_getLabel(labelObj) {
|
_getLabel (labelObj) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
for (const label of this.pullRequest.labels) {
|
for (const label of this.pullRequest.labels) {
|
||||||
if (lableObj && lableObj.name && label.name === lableObj.name) {
|
if (labelObj && labelObj.name && label.name === labelObj.name) {
|
||||||
resolve(lableObj);
|
resolve(labelObj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reject(new Error("Not found"));
|
reject(new Error('Not found'))
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
async _addLabel() {
|
async _addLabel (labelObj) {
|
||||||
const { owner, repo } = this.config;
|
const { owner, repo } = this.config
|
||||||
const number = this.pullRequest.number;
|
const number = this.pullRequest.number
|
||||||
const label = this.config.labelPRConflict;
|
const label = this.config.labelPRConflict
|
||||||
|
|
||||||
// Check if a label does not exist. If it does, it addes the label.
|
// Check if a label does not exist. If it does, it addes the label.
|
||||||
return this._getLabel(label).catch(() => {
|
return this._getLabel(label).catch(() => {
|
||||||
@ -110,9 +98,9 @@ class Presolver {
|
|||||||
repo,
|
repo,
|
||||||
number,
|
number,
|
||||||
labels: [labelObj.name]
|
labels: [labelObj.name]
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Presolver
|
module.exports = Presolver
|
||||||
|
461
probot/presolver/test/events/pullRequests.existing.json
Normal file
461
probot/presolver/test/events/pullRequests.existing.json
Normal file
@ -0,0 +1,461 @@
|
|||||||
|
{
|
||||||
|
"action": "opened",
|
||||||
|
"number": 13,
|
||||||
|
"pull_request": {
|
||||||
|
"url": "https://api.github.com/repos/tbushman/pu/pulls/13",
|
||||||
|
"id": 227499746,
|
||||||
|
"node_id": "MDExOlB1bGxSZXF1ZXN0MjI3NDk5NzQ2",
|
||||||
|
"html_url": "https://github.com/tbushman/pu/pull/13",
|
||||||
|
"diff_url": "https://github.com/tbushman/pu/pull/13.diff",
|
||||||
|
"patch_url": "https://github.com/tbushman/pu/pull/13.patch",
|
||||||
|
"issue_url": "https://api.github.com/repos/tbushman/pu/issues/13",
|
||||||
|
"number": 13,
|
||||||
|
"state": "open",
|
||||||
|
"locked": false,
|
||||||
|
"title": "remove comments",
|
||||||
|
"user": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"body": "",
|
||||||
|
"created_at": "2018-11-01T03:06:36Z",
|
||||||
|
"updated_at": "2018-11-11T09:11:01Z",
|
||||||
|
"closed_at": null,
|
||||||
|
"merged_at": null,
|
||||||
|
"merge_commit_sha": "fc696e1a288b07f66318e775fdd9ea619122d09e",
|
||||||
|
"assignee": null,
|
||||||
|
"assignees": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"requested_reviewers": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"requested_teams": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"labels": [
|
||||||
|
{
|
||||||
|
"id": 511502933,
|
||||||
|
"node_id": "MDU6TGFiZWw1MTE1MDI5MzM=",
|
||||||
|
"url": "https://api.github.com/repos/tbushman/pu/labels/enhancement",
|
||||||
|
"name": "enhancement",
|
||||||
|
"color": "84b6eb",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"milestone": null,
|
||||||
|
"commits_url": "https://api.github.com/repos/tbushman/pu/pulls/13/commits",
|
||||||
|
"review_comments_url": "https://api.github.com/repos/tbushman/pu/pulls/13/comments",
|
||||||
|
"review_comment_url": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}",
|
||||||
|
"comments_url": "https://api.github.com/repos/tbushman/pu/issues/13/comments",
|
||||||
|
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/bce20f1db1348bdc53ac339ff91007afe88518ea",
|
||||||
|
"head": {
|
||||||
|
"label": "tbushman:presolvertest",
|
||||||
|
"ref": "presolvertest",
|
||||||
|
"sha": "bce20f1db1348bdc53ac339ff91007afe88518ea",
|
||||||
|
"user": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 77999410,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnk3Nzk5OTQxMA==",
|
||||||
|
"name": "pu",
|
||||||
|
"full_name": "tbushman/pu",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/tbushman/pu",
|
||||||
|
"description": "Build a map-linked timeline. Currently CV / Portfolio-style. ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/tbushman/pu",
|
||||||
|
"forks_url": "https://api.github.com/repos/tbushman/pu/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/tbushman/pu/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/tbushman/pu/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/tbushman/pu/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/tbushman/pu/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/tbushman/pu/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/tbushman/pu/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/tbushman/pu/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/tbushman/pu/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/tbushman/pu/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/tbushman/pu/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/tbushman/pu/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/tbushman/pu/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/tbushman/pu/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/tbushman/pu/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/tbushman/pu/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/tbushman/pu/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/tbushman/pu/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/tbushman/pu/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/tbushman/pu/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/tbushman/pu/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/tbushman/pu/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/tbushman/pu/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/tbushman/pu/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/tbushman/pu/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/tbushman/pu/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/tbushman/pu/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/tbushman/pu/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/tbushman/pu/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/tbushman/pu/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/tbushman/pu/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/tbushman/pu/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/tbushman/pu/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
|
"updated_at": "2018-07-01T04:09:57Z",
|
||||||
|
"pushed_at": "2018-11-01T03:06:36Z",
|
||||||
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
|
"homepage": "https://pu.bli.sh",
|
||||||
|
"size": 2720,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": "CSS",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 1,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"label": "tbushman:master",
|
||||||
|
"ref": "master",
|
||||||
|
"sha": "0a92c66df823675e2a1a9a74132f2427d5bdd224",
|
||||||
|
"user": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 77999410,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnk3Nzk5OTQxMA==",
|
||||||
|
"name": "pu",
|
||||||
|
"full_name": "tbushman/pu",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/tbushman/pu",
|
||||||
|
"description": "Build a map-linked timeline. Currently CV / Portfolio-style. ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/tbushman/pu",
|
||||||
|
"forks_url": "https://api.github.com/repos/tbushman/pu/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/tbushman/pu/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/tbushman/pu/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/tbushman/pu/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/tbushman/pu/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/tbushman/pu/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/tbushman/pu/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/tbushman/pu/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/tbushman/pu/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/tbushman/pu/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/tbushman/pu/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/tbushman/pu/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/tbushman/pu/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/tbushman/pu/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/tbushman/pu/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/tbushman/pu/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/tbushman/pu/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/tbushman/pu/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/tbushman/pu/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/tbushman/pu/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/tbushman/pu/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/tbushman/pu/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/tbushman/pu/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/tbushman/pu/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/tbushman/pu/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/tbushman/pu/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/tbushman/pu/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/tbushman/pu/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/tbushman/pu/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/tbushman/pu/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/tbushman/pu/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/tbushman/pu/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/tbushman/pu/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
|
"updated_at": "2018-07-01T04:09:57Z",
|
||||||
|
"pushed_at": "2018-11-01T03:06:36Z",
|
||||||
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
|
"homepage": "https://pu.bli.sh",
|
||||||
|
"size": 2720,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": "CSS",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 1,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/13"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://github.com/tbushman/pu/pull/13"
|
||||||
|
},
|
||||||
|
"issue": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/issues/13"
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/issues/13/comments"
|
||||||
|
},
|
||||||
|
"review_comments": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/13/comments"
|
||||||
|
},
|
||||||
|
"review_comment": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}"
|
||||||
|
},
|
||||||
|
"commits": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/13/commits"
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"href": "https://api.github.com/repos/tbushman/pu/statuses/bce20f1db1348bdc53ac339ff91007afe88518ea"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"author_association": "OWNER",
|
||||||
|
"merged": false,
|
||||||
|
"mergeable": null,
|
||||||
|
"rebaseable": null,
|
||||||
|
"mergeable_state": "unknown",
|
||||||
|
"merged_by": null,
|
||||||
|
"comments": 0,
|
||||||
|
"review_comments": 0,
|
||||||
|
"maintainer_can_modify": false,
|
||||||
|
"commits": 1,
|
||||||
|
"additions": 0,
|
||||||
|
"deletions": 6,
|
||||||
|
"changed_files": 1
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"id": 77999410,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnk3Nzk5OTQxMA==",
|
||||||
|
"name": "pu",
|
||||||
|
"full_name": "tbushman/pu",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/tbushman/pu",
|
||||||
|
"description": "Build a map-linked timeline. Currently CV / Portfolio-style. ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/tbushman/pu",
|
||||||
|
"forks_url": "https://api.github.com/repos/tbushman/pu/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/tbushman/pu/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/tbushman/pu/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/tbushman/pu/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/tbushman/pu/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/tbushman/pu/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/tbushman/pu/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/tbushman/pu/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/tbushman/pu/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/tbushman/pu/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/tbushman/pu/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/tbushman/pu/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/tbushman/pu/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/tbushman/pu/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/tbushman/pu/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/tbushman/pu/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/tbushman/pu/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/tbushman/pu/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/tbushman/pu/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/tbushman/pu/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/tbushman/pu/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/tbushman/pu/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/tbushman/pu/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/tbushman/pu/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/tbushman/pu/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/tbushman/pu/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/tbushman/pu/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/tbushman/pu/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/tbushman/pu/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/tbushman/pu/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/tbushman/pu/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/tbushman/pu/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/tbushman/pu/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
|
"updated_at": "2018-07-01T04:09:57Z",
|
||||||
|
"pushed_at": "2018-11-01T03:06:36Z",
|
||||||
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
|
"homepage": "https://pu.bli.sh",
|
||||||
|
"size": 2720,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": "CSS",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 1,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"login": "tbushman",
|
||||||
|
"id": 7049294,
|
||||||
|
"node_id": "MDQ6VXNlcjcwNDkyOTQ=",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/7049294?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/tbushman",
|
||||||
|
"html_url": "https://github.com/tbushman",
|
||||||
|
"followers_url": "https://api.github.com/users/tbushman/followers",
|
||||||
|
"following_url": "https://api.github.com/users/tbushman/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/tbushman/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/tbushman/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/tbushman/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/tbushman/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/tbushman/repos",
|
||||||
|
"events_url": "https://api.github.com/users/tbushman/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/tbushman/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"installation": {
|
||||||
|
"id": 421598,
|
||||||
|
"node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uNDIxNTk4"
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"action": "opened",
|
"action": "opened",
|
||||||
"number": 13,
|
"number": 15,
|
||||||
"pull_request": {
|
"pull_request": {
|
||||||
"url": "https://api.github.com/repos/tbushman/pu/pulls/13",
|
"url": "https://api.github.com/repos/tbushman/pu/pulls/15",
|
||||||
"id": 227499746,
|
"id": 231769233,
|
||||||
"node_id": "MDExOlB1bGxSZXF1ZXN0MjI3NDk5NzQ2",
|
"node_id": "MDExOlB1bGxSZXF1ZXN0MjMxNzY5MjMz",
|
||||||
"html_url": "https://github.com/tbushman/pu/pull/13",
|
"html_url": "https://github.com/tbushman/pu/pull/15",
|
||||||
"diff_url": "https://github.com/tbushman/pu/pull/13.diff",
|
"diff_url": "https://github.com/tbushman/pu/pull/15.diff",
|
||||||
"patch_url": "https://github.com/tbushman/pu/pull/13.patch",
|
"patch_url": "https://github.com/tbushman/pu/pull/15.patch",
|
||||||
"issue_url": "https://api.github.com/repos/tbushman/pu/issues/13",
|
"issue_url": "https://api.github.com/repos/tbushman/pu/issues/15",
|
||||||
"number": 13,
|
"number": 15,
|
||||||
"state": "open",
|
"state": "open",
|
||||||
"locked": false,
|
"locked": false,
|
||||||
"title": "remove comments",
|
"title": "remove comments 2",
|
||||||
"user": {
|
"user": {
|
||||||
"login": "tbushman",
|
"login": "tbushman",
|
||||||
"id": 7049294,
|
"id": 7049294,
|
||||||
@ -34,11 +34,11 @@
|
|||||||
"site_admin": false
|
"site_admin": false
|
||||||
},
|
},
|
||||||
"body": "",
|
"body": "",
|
||||||
"created_at": "2018-11-01T03:06:36Z",
|
"created_at": "2018-11-18T05:12:18Z",
|
||||||
"updated_at": "2018-11-11T09:11:01Z",
|
"updated_at": "2018-11-18T05:12:18Z",
|
||||||
"closed_at": null,
|
"closed_at": null,
|
||||||
"merged_at": null,
|
"merged_at": null,
|
||||||
"merge_commit_sha": "fc696e1a288b07f66318e775fdd9ea619122d09e",
|
"merge_commit_sha": null,
|
||||||
"assignee": null,
|
"assignee": null,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
|
|
||||||
@ -50,25 +50,18 @@
|
|||||||
|
|
||||||
],
|
],
|
||||||
"labels": [
|
"labels": [
|
||||||
{
|
|
||||||
"id": 511502933,
|
|
||||||
"node_id": "MDU6TGFiZWw1MTE1MDI5MzM=",
|
|
||||||
"url": "https://api.github.com/repos/tbushman/pu/labels/enhancement",
|
|
||||||
"name": "enhancement",
|
|
||||||
"color": "84b6eb",
|
|
||||||
"default": true
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"milestone": null,
|
"milestone": null,
|
||||||
"commits_url": "https://api.github.com/repos/tbushman/pu/pulls/13/commits",
|
"commits_url": "https://api.github.com/repos/tbushman/pu/pulls/15/commits",
|
||||||
"review_comments_url": "https://api.github.com/repos/tbushman/pu/pulls/13/comments",
|
"review_comments_url": "https://api.github.com/repos/tbushman/pu/pulls/15/comments",
|
||||||
"review_comment_url": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}",
|
"review_comment_url": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}",
|
||||||
"comments_url": "https://api.github.com/repos/tbushman/pu/issues/13/comments",
|
"comments_url": "https://api.github.com/repos/tbushman/pu/issues/15/comments",
|
||||||
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/bce20f1db1348bdc53ac339ff91007afe88518ea",
|
"statuses_url": "https://api.github.com/repos/tbushman/pu/statuses/c9f2f27b01043673c8abad91500ac8197d75f8b0",
|
||||||
"head": {
|
"head": {
|
||||||
"label": "tbushman:presolvertest",
|
"label": "tbushman:presolvertest2",
|
||||||
"ref": "presolvertest",
|
"ref": "presolvertest2",
|
||||||
"sha": "bce20f1db1348bdc53ac339ff91007afe88518ea",
|
"sha": "c9f2f27b01043673c8abad91500ac8197d75f8b0",
|
||||||
"user": {
|
"user": {
|
||||||
"login": "tbushman",
|
"login": "tbushman",
|
||||||
"id": 7049294,
|
"id": 7049294,
|
||||||
@ -156,14 +149,14 @@
|
|||||||
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
"created_at": "2017-01-04T09:05:47Z",
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
"updated_at": "2018-07-01T04:09:57Z",
|
"updated_at": "2018-11-12T11:15:42Z",
|
||||||
"pushed_at": "2018-11-01T03:06:36Z",
|
"pushed_at": "2018-11-18T05:11:55Z",
|
||||||
"git_url": "git://github.com/tbushman/pu.git",
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
"ssh_url": "git@github.com:tbushman/pu.git",
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
"clone_url": "https://github.com/tbushman/pu.git",
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
"svn_url": "https://github.com/tbushman/pu",
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
"homepage": "https://pu.bli.sh",
|
"homepage": "https://pu.bli.sh",
|
||||||
"size": 2720,
|
"size": 2758,
|
||||||
"stargazers_count": 0,
|
"stargazers_count": 0,
|
||||||
"watchers_count": 0,
|
"watchers_count": 0,
|
||||||
"language": "CSS",
|
"language": "CSS",
|
||||||
@ -175,10 +168,10 @@
|
|||||||
"forks_count": 0,
|
"forks_count": 0,
|
||||||
"mirror_url": null,
|
"mirror_url": null,
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"open_issues_count": 1,
|
"open_issues_count": 2,
|
||||||
"license": null,
|
"license": null,
|
||||||
"forks": 0,
|
"forks": 0,
|
||||||
"open_issues": 1,
|
"open_issues": 2,
|
||||||
"watchers": 0,
|
"watchers": 0,
|
||||||
"default_branch": "master"
|
"default_branch": "master"
|
||||||
}
|
}
|
||||||
@ -186,7 +179,7 @@
|
|||||||
"base": {
|
"base": {
|
||||||
"label": "tbushman:master",
|
"label": "tbushman:master",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"sha": "0a92c66df823675e2a1a9a74132f2427d5bdd224",
|
"sha": "d91cfc285ddb7fc13d370694617fb9d3fda7c9d6",
|
||||||
"user": {
|
"user": {
|
||||||
"login": "tbushman",
|
"login": "tbushman",
|
||||||
"id": 7049294,
|
"id": 7049294,
|
||||||
@ -274,14 +267,14 @@
|
|||||||
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
"created_at": "2017-01-04T09:05:47Z",
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
"updated_at": "2018-07-01T04:09:57Z",
|
"updated_at": "2018-11-12T11:15:42Z",
|
||||||
"pushed_at": "2018-11-01T03:06:36Z",
|
"pushed_at": "2018-11-18T05:11:55Z",
|
||||||
"git_url": "git://github.com/tbushman/pu.git",
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
"ssh_url": "git@github.com:tbushman/pu.git",
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
"clone_url": "https://github.com/tbushman/pu.git",
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
"svn_url": "https://github.com/tbushman/pu",
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
"homepage": "https://pu.bli.sh",
|
"homepage": "https://pu.bli.sh",
|
||||||
"size": 2720,
|
"size": 2758,
|
||||||
"stargazers_count": 0,
|
"stargazers_count": 0,
|
||||||
"watchers_count": 0,
|
"watchers_count": 0,
|
||||||
"language": "CSS",
|
"language": "CSS",
|
||||||
@ -293,38 +286,38 @@
|
|||||||
"forks_count": 0,
|
"forks_count": 0,
|
||||||
"mirror_url": null,
|
"mirror_url": null,
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"open_issues_count": 1,
|
"open_issues_count": 2,
|
||||||
"license": null,
|
"license": null,
|
||||||
"forks": 0,
|
"forks": 0,
|
||||||
"open_issues": 1,
|
"open_issues": 2,
|
||||||
"watchers": 0,
|
"watchers": 0,
|
||||||
"default_branch": "master"
|
"default_branch": "master"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"_links": {
|
"_links": {
|
||||||
"self": {
|
"self": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/pulls/13"
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/15"
|
||||||
},
|
},
|
||||||
"html": {
|
"html": {
|
||||||
"href": "https://github.com/tbushman/pu/pull/13"
|
"href": "https://github.com/tbushman/pu/pull/15"
|
||||||
},
|
},
|
||||||
"issue": {
|
"issue": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/issues/13"
|
"href": "https://api.github.com/repos/tbushman/pu/issues/15"
|
||||||
},
|
},
|
||||||
"comments": {
|
"comments": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/issues/13/comments"
|
"href": "https://api.github.com/repos/tbushman/pu/issues/15/comments"
|
||||||
},
|
},
|
||||||
"review_comments": {
|
"review_comments": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/pulls/13/comments"
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/15/comments"
|
||||||
},
|
},
|
||||||
"review_comment": {
|
"review_comment": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}"
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/comments{/number}"
|
||||||
},
|
},
|
||||||
"commits": {
|
"commits": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/pulls/13/commits"
|
"href": "https://api.github.com/repos/tbushman/pu/pulls/15/commits"
|
||||||
},
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
"href": "https://api.github.com/repos/tbushman/pu/statuses/bce20f1db1348bdc53ac339ff91007afe88518ea"
|
"href": "https://api.github.com/repos/tbushman/pu/statuses/c9f2f27b01043673c8abad91500ac8197d75f8b0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"author_association": "OWNER",
|
"author_association": "OWNER",
|
||||||
@ -337,9 +330,9 @@
|
|||||||
"review_comments": 0,
|
"review_comments": 0,
|
||||||
"maintainer_can_modify": false,
|
"maintainer_can_modify": false,
|
||||||
"commits": 1,
|
"commits": 1,
|
||||||
"additions": 0,
|
"additions": 1,
|
||||||
"deletions": 6,
|
"deletions": 3,
|
||||||
"changed_files": 1
|
"changed_files": 2
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"id": 77999410,
|
"id": 77999410,
|
||||||
@ -408,14 +401,14 @@
|
|||||||
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
"releases_url": "https://api.github.com/repos/tbushman/pu/releases{/id}",
|
||||||
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
"deployments_url": "https://api.github.com/repos/tbushman/pu/deployments",
|
||||||
"created_at": "2017-01-04T09:05:47Z",
|
"created_at": "2017-01-04T09:05:47Z",
|
||||||
"updated_at": "2018-07-01T04:09:57Z",
|
"updated_at": "2018-11-12T11:15:42Z",
|
||||||
"pushed_at": "2018-11-01T03:06:36Z",
|
"pushed_at": "2018-11-18T05:11:55Z",
|
||||||
"git_url": "git://github.com/tbushman/pu.git",
|
"git_url": "git://github.com/tbushman/pu.git",
|
||||||
"ssh_url": "git@github.com:tbushman/pu.git",
|
"ssh_url": "git@github.com:tbushman/pu.git",
|
||||||
"clone_url": "https://github.com/tbushman/pu.git",
|
"clone_url": "https://github.com/tbushman/pu.git",
|
||||||
"svn_url": "https://github.com/tbushman/pu",
|
"svn_url": "https://github.com/tbushman/pu",
|
||||||
"homepage": "https://pu.bli.sh",
|
"homepage": "https://pu.bli.sh",
|
||||||
"size": 2720,
|
"size": 2758,
|
||||||
"stargazers_count": 0,
|
"stargazers_count": 0,
|
||||||
"watchers_count": 0,
|
"watchers_count": 0,
|
||||||
"language": "CSS",
|
"language": "CSS",
|
||||||
@ -427,10 +420,10 @@
|
|||||||
"forks_count": 0,
|
"forks_count": 0,
|
||||||
"mirror_url": null,
|
"mirror_url": null,
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"open_issues_count": 1,
|
"open_issues_count": 2,
|
||||||
"license": null,
|
"license": null,
|
||||||
"forks": 0,
|
"forks": 0,
|
||||||
"open_issues": 1,
|
"open_issues": 2,
|
||||||
"watchers": 0,
|
"watchers": 0,
|
||||||
"default_branch": "master"
|
"default_branch": "master"
|
||||||
},
|
},
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
const expect = require('expect');
|
const expect = require('expect')
|
||||||
const { Probot } = require('probot')
|
const { Probot } = require('probot')
|
||||||
const prSuccessEvent = require('./events/pullRequests.opened')
|
const prSuccessEvent = require('./events/pullRequests.opened')
|
||||||
const probotPlugin = require('..')
|
const probotPlugin = require('..')
|
||||||
// Requiring our fixtures
|
|
||||||
//const payload = require('./fixtures/pullRequests.labeled')
|
|
||||||
//const issueCreatedBody = { body: 'Thanks for contributing!' }
|
|
||||||
// const url = (process.env.NODE_ENV === 'production' ? 'https://api.github.com' : 'https://smee.io/Vq0IH8tsXTuCp6kM')
|
|
||||||
//nock.disableNetConnect()
|
|
||||||
|
|
||||||
describe('Presolver', () => {
|
describe('Presolver', () => {
|
||||||
let probot, github
|
let probot, github
|
||||||
@ -36,12 +31,12 @@ describe('Presolver', () => {
|
|||||||
{filename: 'test.txt'}
|
{filename: 'test.txt'}
|
||||||
]
|
]
|
||||||
})),
|
})),
|
||||||
getAll: jest.fn().mockResolvedValue({ data: [prSuccessEvent] })
|
getAll: jest.fn().mockImplementation(() => ({ data: [prSuccessEvent.pull_request] }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
app.auth = () => Promise.resolve(github)
|
app.auth = () => Promise.resolve(github)
|
||||||
// just return a test token
|
// just return a test token
|
||||||
//app.app = () => 'test'
|
// app.app = () => 'test'
|
||||||
})
|
})
|
||||||
|
|
||||||
test('creates a comment when an issue is opened', async () => {
|
test('creates a comment when an issue is opened', async () => {
|
||||||
|
Reference in New Issue
Block a user