Skip to content

Commit

Permalink
#29032: testing on master (#29140)
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralfaro-dotcms authored Jul 5, 2024
1 parent 6c222d0 commit 5ad2ec8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/frontend-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
name: 'Notification for Frontend'
on:
workflow_call:
inputs:
edit_type:
description: 'Type of edition, whether it''s BODY or LABEL'
required: true
type: string
secrets:
CI_MACHINE_USER:
description: 'CI machine user'
Expand All @@ -23,9 +18,13 @@ jobs:
outputs:
issue_number: ${{ steps.evaluate-actions.outputs.issue_number }}
steps:
- run: echo 'GitHub context'
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

- name: Check if Technology body changed
id: body-technology-check
if: github.event.action == 'edited' && inputs.edit_type == 'BODY'
if: github.event.action == 'edited'
uses: actions/github-script@v7
with:
script: |
Expand Down Expand Up @@ -77,7 +76,7 @@ jobs:
- name: Check if Technology label changed
id: label-technology-check
if: github.event.action == 'labeled' && inputs.edit_type == 'LABEL'
if: github.event.action == 'labeled'
uses: actions/github-script@v7
with:
script: |
Expand All @@ -101,13 +100,15 @@ jobs:
- name: Resolve detected actions
id: resolve-actions
run: |
if [[ '${{ github.event.action == 'edited' || inputs.edit_type == 'BODY' }}' == 'true' ]]; then
if [[ '${{ github.event.action == 'edited' }}' == 'true' ]]; then
actions="${{ toJSON(steps.body-technology-check.outputs.actions) }}"
elif [[ '${{ github.event.action == 'labeled' || inputs.edit_type == 'LABEL' }}' == 'true' ]]; then
elif [[ '${{ github.event.action == 'labeled' }}' == 'true' ]]; then
actions="${{ toJSON(steps.label-technology-check.outputs.actions) }}"
else
actions='[]'
fi
[[ "${actions}" == 'null ]] && actions='[]'
echo "actions: ${actions}"
echo "actions=${actions}" >> $GITHUB_OUTPUT
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/post-issue-edited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
name: Issue Resolve Actions
if: success()
uses: ./.github/workflows/frontend-notify.yml
with:
edit_type: LABEL
secrets:
CI_MACHINE_USER: ${{ secrets.CI_MACHINE_USER }}
CI_MACHINE_TOKEN: ${{ secrets.CI_MACHINE_TOKEN }}
Expand Down

0 comments on commit 5ad2ec8

Please sign in to comment.