Remove PR column

This commit is contained in:
Andrea Maria Piana 2020-11-30 11:12:47 +01:00
parent 232c5726c2
commit c4e3526bef
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
2 changed files with 0 additions and 19 deletions

View File

@ -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

View File

@ -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);