Skip to content

Commit

Permalink
action.*: add label, moved out of
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed May 16, 2024
1 parent b8a481c commit 76b4146
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions action.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ function hashFiles (filename) {
}

module.exports = async ({ github, context, inputs, steps, actionPath, core }) => {
// add label step
if (steps['reviewdog-enabled-pr'].outputs.result === 'true' && steps['should-trigger'].outputs.result === 'true') {
const {default: addLabel} = await import(`${actionPath}/src/steps/addLabel.js`)
return await addLabel({context, github, 'needs-security-review'})
}
// add assignees step
if (steps['reviewdog-enabled-pr'].outputs.result === 'true' && steps['should-trigger'].outputs.result === 'true') {
const { default: addAssignees } = await import(`${actionPath}/src/steps/addAssignees.js`)
Expand Down
7 changes: 0 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,6 @@ runs:
const actionPath = '${{ github.action_path }}'
const {default: addLabel} = await import(`${actionPath}/src/steps/addLabel.js`)
return await addLabel({context, github, 'unverified-commits'})
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ (steps.reviewdog-enabled-pr.outputs.result == 'true' && steps.should-trigger.outputs.result == 'true') }}
with:
script: |
const actionPath = '${{ github.action_path }}'
const {default: addLabel} = await import(`${actionPath}/src/steps/addLabel.js`)
return await addLabel({context, github, 'needs-security-review'})
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
Expand Down

0 comments on commit 76b4146

Please sign in to comment.