From 36a6465be35aee840a293a73f8cfcf0d6263aa59 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 May 2024 14:45:46 +0200 Subject: [PATCH] action.yml: move scripts in src/steps --- action.yml | 14 +++++++------- src/{ => steps}/assigneeRemoved.js | 0 src/{ => steps}/assigneesAfter.js | 0 src/{ => steps}/cleanupComments.js | 0 src/{ => steps}/commentsNumber.js | 0 src/{ => steps}/hotwords.js | 0 src/{ => steps}/unverifiedCommits.js | 0 7 files changed, 7 insertions(+), 7 deletions(-) rename src/{ => steps}/assigneeRemoved.js (100%) rename src/{ => steps}/assigneesAfter.js (100%) rename src/{ => steps}/cleanupComments.js (100%) rename src/{ => steps}/commentsNumber.js (100%) rename src/{ => steps}/hotwords.js (100%) rename src/{ => steps}/unverifiedCommits.js (100%) diff --git a/action.yml b/action.yml index 16e9aa5b..3a7b4185 100644 --- a/action.yml +++ b/action.yml @@ -125,8 +125,8 @@ runs: script: | const actionPath = '${{ github.action_path }}' - const {default: commentsNumber} = await import(`${actionPath}/src/commentsNumber.js`) - const {default: cleanupComments} = await import(`${actionPath}/src/cleanupComments.js`) + const {default: commentsNumber} = await import(`${actionPath}/src/steps/commentsNumber.js`) + const {default: cleanupComments} = await import(`${actionPath}/src/steps/cleanupComments.js`) const number = await commentsNumber({context, github}) await cleanupComments({context, github}) @@ -138,7 +138,7 @@ runs: script: | const actionPath = '${{ github.action_path }}' - const {default: unverifiedCommits} = await import(`${actionPath}/src/unverifiedCommits.js`) + const {default: unverifiedCommits} = await import(`${actionPath}/src/steps/unverifiedCommits.js`) return await unverifiedCommits({context, github}) - if: ${{ steps.reviewdog-enabled.outputs.result == 'true' }} @@ -225,7 +225,7 @@ runs: with: script: | const actionPath = '${{ github.action_path }}' - const {default: commentsNumber} = await import(`${actionPath}/src/commentsNumber.js`) + const {default: commentsNumber} = await import(`${actionPath}/src/steps/commentsNumber.js`) return await commentsNumber({context, github}) - id: assignees-after if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' }} @@ -235,7 +235,7 @@ runs: with: script: | const actionPath = '${{ github.action_path }}' - const {default: assigneesAfter} = await import(`${actionPath}/src/assigneesAfter.js`) + const {default: assigneesAfter} = await import(`${actionPath}/src/steps/assigneesAfter.js`) return await assigneesAfter({context, github}) - id: assignee-removed-label if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' }} @@ -245,7 +245,7 @@ runs: with: script: | const actionPath = '${{ github.action_path }}' - const {default: assigneeRemoved} = await import(`${actionPath}/src/assigneeRemoved.js`) + const {default: assigneeRemoved} = await import(`${actionPath}/src/steps/assigneeRemoved.js`) return await assigneeRemoved({context, github}) - id: description-contains-hotwords if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' && github.actor != 'renovate[bot]' }} @@ -255,7 +255,7 @@ runs: with: script: | const actionPath = '${{ github.action_path }}' - const {default: hotwords} = await import(`${actionPath}/src/hotwords.js`) + const {default: hotwords} = await import(`${actionPath}/src/steps/hotwords.js`) return await hotwords({context, github}) - id: should-trigger if: ${{ steps.reviewdog-enabled-pr.outputs.result == 'true' && !(steps.assignee-removed-label.outputs.result == 'true') && ( (steps.comments-before.outputs.result != steps.comments-after.outputs.result) || steps.description-contains-hotwords.outputs.result == 'true') }} diff --git a/src/assigneeRemoved.js b/src/steps/assigneeRemoved.js similarity index 100% rename from src/assigneeRemoved.js rename to src/steps/assigneeRemoved.js diff --git a/src/assigneesAfter.js b/src/steps/assigneesAfter.js similarity index 100% rename from src/assigneesAfter.js rename to src/steps/assigneesAfter.js diff --git a/src/cleanupComments.js b/src/steps/cleanupComments.js similarity index 100% rename from src/cleanupComments.js rename to src/steps/cleanupComments.js diff --git a/src/commentsNumber.js b/src/steps/commentsNumber.js similarity index 100% rename from src/commentsNumber.js rename to src/steps/commentsNumber.js diff --git a/src/hotwords.js b/src/steps/hotwords.js similarity index 100% rename from src/hotwords.js rename to src/steps/hotwords.js diff --git a/src/unverifiedCommits.js b/src/steps/unverifiedCommits.js similarity index 100% rename from src/unverifiedCommits.js rename to src/steps/unverifiedCommits.js