mirror of
https://github.com/status-im/zenhub-automations.git
synced 2025-02-21 14:48:17 +00:00
Remove PR column
This commit is contained in:
parent
232c5726c2
commit
c4e3526bef
@ -42,7 +42,6 @@ action "zh_automations" {
|
||||
uses = "james1x0/zenhub-automations@master"
|
||||
secrets = ["GITHUB_TOKEN", "ZENHUB_API_KEY"]
|
||||
env = {
|
||||
PR_COLUMN = "[ID of column]"
|
||||
INPROG_COLUMN = "[ID of column]"
|
||||
REVIEW_COLUMN = "[ID of column]"
|
||||
}
|
||||
@ -57,7 +56,6 @@ action "branch_zh_automations" {
|
||||
uses = "james1x0/zenhub-automations@master"
|
||||
secrets = ["GITHUB_TOKEN", "ZENHUB_API_KEY"]
|
||||
env = {
|
||||
PR_COLUMN = "[ID of column]"
|
||||
REVIEW_COLUMN = "[ID of column]"
|
||||
INPROG_COLUMN = "[ID of column]"
|
||||
}
|
||||
@ -67,7 +65,6 @@ action "branch_zh_automations" {
|
||||
|
||||
### Getting your column IDs
|
||||
You'll need the following IDs for functionality on Zenhub:
|
||||
`PR_COLUMN` Where new PRs land
|
||||
`REVIEW_COLUMN` Where issues land when referenced in a PR
|
||||
`INPROG_COLUMN` Where issues land when referenced in a branch name
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
const zh = require('../zh-client'),
|
||||
resolveIssueNumbers = require('../resolve-issue-number'),
|
||||
{
|
||||
INPUT_PR_COLUMN,
|
||||
INPUT_REVIEW_COLUMN
|
||||
} = process.env;
|
||||
|
||||
@ -11,21 +10,6 @@ exports.opened = async function handleOpenedPR (tools) {
|
||||
const failures = [],
|
||||
{ payload } = tools.context;
|
||||
|
||||
// Move PR to PR issue column specified by ENV var
|
||||
if (INPUT_PR_COLUMN) {
|
||||
tools.log.info('ZH :: Moving opened PR...');
|
||||
try {
|
||||
await zh.issues.moveIssueBetweenPipelines(payload.repository.id, payload.number, {
|
||||
pipeline_id: INPUT_PR_COLUMN,
|
||||
position: 'top'
|
||||
});
|
||||
} catch (e) {
|
||||
failures.push(e);
|
||||
}
|
||||
} else {
|
||||
tools.log.info('ZH :: Skipped moving opened PR because `PR_COLUMN` is undefined.');
|
||||
}
|
||||
|
||||
// Move PR closes to REVIEW_COLUMN
|
||||
if (INPUT_REVIEW_COLUMN) {
|
||||
let issueNumbers = resolveIssueNumbers(payload.pull_request.head.ref, payload.pull_request.body);
|
||||
|
Loading…
x
Reference in New Issue
Block a user