Skip to content
This repository was archived by the owner on May 15, 2021. It is now read-only.

Commit 0293780

Browse files
feat: build for release
1 parent f21ad17 commit 0293780

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"auto-cancel-redundant-workflow","sha":"2a2f79f324f1e5da7fced0553a6a9f90fa1a8334","ref":"refs/tags/test/v1.7.1.524976961","tagName":"test/v1.7.1.524976961","branch":"gh-actions","tags":["test/v1.7.1.524976961","test/v1.7.1","test/v1.7","test/v1"],"updated_at":"2021-01-31T09:13:15.249Z"}
1+
{"owner":"technote-space","repo":"auto-cancel-redundant-workflow","sha":"FETCH_HEAD","ref":"refs/heads/master","tagName":"test/v1.7.1","branch":"gh-actions","tags":["test/v1.7.1","test/v1.7","test/v1"],"updated_at":"2021-02-05T17:05:39.636Z"}

lib/process.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const execute = async (logger, octokit, context) => {
2020
const workflowId = await workflow_1.getWorkflowId(run);
2121
logger.info('workflow id: %d', workflowId);
2222
const runs = await workflow_1.getWorkflowRuns(workflowId, logger, octokit, context);
23+
if (!runs.some(_run => _run.run_number === run.run_number)) {
24+
runs.push(run);
25+
}
2326
logger.startProcess('workflow runs:');
2427
console.log(runs.map(run => misc_1.getFilteredRun(run)));
2528
logger.endProcess();
@@ -35,7 +38,12 @@ const execute = async (logger, octokit, context) => {
3538
await targetRuns.reduce(async (prev, run) => {
3639
await prev;
3740
logger.log('cancel: %d', run.id);
38-
await workflow_1.cancelWorkflowRun(run.id, octokit, context);
41+
try {
42+
await workflow_1.cancelWorkflowRun(run.id, octokit, context);
43+
}
44+
catch (error) {
45+
logger.error(error.message);
46+
}
3947
if (interval) {
4048
await github_action_helper_1.Utils.sleep(interval);
4149
}

node_modules/.yarn-integrity

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)