-
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.
Release :: Beech Anhinga
- Loading branch information
Showing
65 changed files
with
3,001 additions
and
2,734 deletions.
There are no files selected for viewing
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 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 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,31 +1,25 @@ | ||
import { ASSIGN_DATA } from '../mutations'; | ||
import { logInfo, logTaskStart } from '../log'; | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const CREATE_BRANCH = 'CREATE_BRANCH'; | ||
const CREATE_BRANCH = 'CREATE_BRANCH' | ||
|
||
const createBranch = ({ commit, getters, state }, isSkipped) => { | ||
logTaskStart('Create branch'); | ||
const createBranch = ({ getters }) => async ({ base, head, isSkipped }) => { | ||
logTaskStart('Create branch') | ||
|
||
if (isSkipped) { | ||
return undefined; | ||
return undefined | ||
} | ||
|
||
logInfo(`Creating branch \`${ | ||
state.data.head | ||
}\` from \`${ | ||
state.data.base | ||
}\`...`); | ||
logInfo(`Creating branch \`${head}\` from \`${base}\`...`) | ||
|
||
return getters.github.branches.create({ | ||
base: state.data.base, | ||
head: state.data.head | ||
const branch = await getters.query('branches.create')({ | ||
base: base, | ||
head: head | ||
}) | ||
.then(({ branch, url }) => { | ||
logInfo(url); | ||
|
||
return commit(ASSIGN_DATA, { branch: branch }); | ||
}); | ||
}; | ||
logInfo(branch.url) | ||
|
||
export { CREATE_BRANCH }; | ||
export default createBranch; | ||
return branch | ||
} | ||
|
||
export { CREATE_BRANCH } | ||
export default createBranch |
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,32 +1,29 @@ | ||
import map from 'lodash/fp/map'; | ||
import reject from 'lodash/fp/reject'; | ||
import { ASSIGN_DATA } from '../mutations'; | ||
import { logInfo, logTaskStart } from '../log'; | ||
import map from 'lodash/fp/map' | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const CREATE_LABELS = 'CREATE_LABELS'; | ||
const CREATE_LABELS = 'CREATE_LABELS' | ||
|
||
const createLabels = ({ commit, getters, state }, isSkipped) => { | ||
logTaskStart('Create labels'); | ||
const createLabels = ({ getters }) => async ({ isSkipped, labels }) => { | ||
logTaskStart('Create labels') | ||
|
||
if (isSkipped) { | ||
return undefined; | ||
return undefined | ||
} | ||
|
||
logInfo('Creating labels...'); | ||
logInfo('Creating labels...') | ||
|
||
return Promise.all( | ||
map((label) => ( | ||
getters.github.labels.create(label) | ||
.then(({ name, url }) => { | ||
logInfo(`${name}: ${url}`); | ||
const createdLabels = await Promise.all( | ||
map(async (label) => { | ||
const createdLabel = await getters.query('labels.create')(label) | ||
|
||
return commit(ASSIGN_DATA, { | ||
labels: reject(['name', name])(state.data.labels) | ||
}); | ||
}) | ||
))(state.data.labels) | ||
); | ||
}; | ||
logInfo(`${createdLabel.name}: ${createdLabel.url}`) | ||
|
||
export { CREATE_LABELS }; | ||
export default createLabels; | ||
return createdLabel | ||
})(labels) | ||
) | ||
|
||
return createdLabels | ||
} | ||
|
||
export { CREATE_LABELS } | ||
export default createLabels |
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,33 +1,33 @@ | ||
import { ASSIGN_DATA } from '../mutations'; | ||
import { logInfo, logTaskStart } from '../log'; | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const CREATE_PULL_REQUEST = 'CREATE_PULL_REQUEST'; | ||
const CREATE_PULL_REQUEST = 'CREATE_PULL_REQUEST' | ||
|
||
const createPullRequest = ({ commit, getters, state }, isSkipped) => { | ||
logTaskStart('Create pull request'); | ||
const createPullRequest = ({ getters }) => async ({ | ||
base, | ||
changelog, | ||
head, | ||
isSkipped, | ||
name | ||
}) => { | ||
logTaskStart('Create pull request') | ||
|
||
if (isSkipped) { | ||
return undefined; | ||
return undefined | ||
} | ||
|
||
logInfo(`Creating pull request for \`${ | ||
state.data.head | ||
}\` into \`${ | ||
state.data.base | ||
}\`...`); | ||
|
||
return getters.github.pullRequests.create({ | ||
base: state.data.base, | ||
changelog: state.data.changelog.text, | ||
head: state.data.head, | ||
name: state.data.name | ||
logInfo(`Creating pull request for \`${head}\` into \`${base}\`...`) | ||
|
||
const pullRequest = await getters.query('pullRequests.create')({ | ||
base: base, | ||
changelog: changelog, | ||
head: head, | ||
name: name | ||
}) | ||
.then(({ number, url }) => { | ||
logInfo(url); | ||
|
||
return commit(ASSIGN_DATA, { number: number }); | ||
}); | ||
}; | ||
logInfo(pullRequest.url) | ||
|
||
return pullRequest | ||
} | ||
|
||
export { CREATE_PULL_REQUEST }; | ||
export default createPullRequest; | ||
export { CREATE_PULL_REQUEST } | ||
export default createPullRequest |
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,34 +1,39 @@ | ||
import { ASSIGN_DATA } from '../mutations'; | ||
import { logInfo, logTaskStart } from '../log'; | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const CREATE_RELEASE = 'CREATE_RELEASE'; | ||
const CREATE_RELEASE = 'CREATE_RELEASE' | ||
|
||
const createRelease = ({ commit, getters, state }, isSkipped) => { | ||
logTaskStart('Create release'); | ||
const createRelease = ({ getters }) => async ({ | ||
branch, | ||
changelog, | ||
isPrerelease, | ||
isSkipped, | ||
name, | ||
tag | ||
}) => { | ||
logTaskStart('Create release') | ||
|
||
if (isSkipped) { | ||
return undefined; | ||
return undefined | ||
} | ||
|
||
logInfo(`Creating new ${ | ||
state.data.isPrerelease | ||
isPrerelease | ||
? 'prerelease' | ||
: 'release' | ||
}...`); | ||
|
||
return getters.github.releases.create({ | ||
branch: state.data.branch, | ||
changelog: state.data.changelog.text, | ||
isPrerelease: state.data.isPrerelease, | ||
name: state.data.name, | ||
tag: state.data.tag | ||
}...`) | ||
|
||
const release = await getters.query('releases.create')({ | ||
branch: branch, | ||
changelog: changelog, | ||
isPrerelease: isPrerelease, | ||
name: name, | ||
tag: tag | ||
}) | ||
.then(({ tag, url }) => { | ||
logInfo(url); | ||
|
||
return commit(ASSIGN_DATA, { tag: tag }); | ||
}); | ||
}; | ||
logInfo(release.url) | ||
|
||
return release | ||
} | ||
|
||
export { CREATE_RELEASE }; | ||
export default createRelease; | ||
export { CREATE_RELEASE } | ||
export default createRelease |
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,18 +1,20 @@ | ||
import { logInfo, logTaskStart } from '../log'; | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const DELETE_BRANCH = 'DELETE_BRANCH'; | ||
const DELETE_BRANCH = 'DELETE_BRANCH' | ||
|
||
const deleteBranch = ({ getters, state }, isSkipped) => { | ||
logTaskStart('Delete branch'); | ||
const deleteBranch = ({ getters }) => async ({ isSkipped, name }) => { | ||
logTaskStart('Delete branch') | ||
|
||
if (isSkipped) { | ||
return undefined; | ||
return undefined | ||
} | ||
|
||
logInfo(`Deleting branch \`${state.data.branch}\`...`); | ||
logInfo(`Deleting branch \`${name}\`...`) | ||
|
||
return getters.github.branches.delete({ branch: state.data.branch }); | ||
}; | ||
await getters.query('branches.delete')({ name: name }) | ||
|
||
export { DELETE_BRANCH }; | ||
export default deleteBranch; | ||
return undefined | ||
} | ||
|
||
export { DELETE_BRANCH } | ||
export default deleteBranch |
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,29 @@ | ||
import { logInfo, logTaskStart } from '../log' | ||
|
||
const FIND_PULL_REQUEST = 'FIND_PULL_REQUEST' | ||
|
||
const findPullRequest = ({ getters }) => async ({ | ||
base, | ||
head, | ||
isSkipped | ||
}) => { | ||
logTaskStart('Find pull request') | ||
|
||
if (isSkipped) { | ||
return undefined | ||
} | ||
|
||
logInfo(`Searching pull request for \`${head}\` into \`${base}\`...`) | ||
|
||
const pullRequest = await getters.query('pullRequests.find')({ | ||
base: base, | ||
head: head | ||
}) | ||
|
||
logInfo(pullRequest.number) | ||
|
||
return pullRequest | ||
} | ||
|
||
export { FIND_PULL_REQUEST } | ||
export default findPullRequest |
Oops, something went wrong.