Skip to content

Commit

Permalink
no env in slack action
Browse files Browse the repository at this point in the history
  • Loading branch information
swryan committed Nov 29, 2023
1 parent 770479e commit f4ed57c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/update_integrated.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def update_integrated(poem_id):
"""
filename = f'POEM_{poem_id:0>3}.md'

print(f'updating POEM_{filename}')
print(f'updating {filename}')

try:
with open(filename, 'r') as poem_md:
Expand All @@ -47,7 +47,6 @@ def update_integrated(poem_id):
right = line[line.find(']'):]
if left and right:
if lu.endswith('INTEGRATED'):
print(f"Updating status in '{poem_md}' to Integrated")
print(f'{left}[x{right}', file=poem_md, end='')
in_status = False
success = True
Expand All @@ -61,6 +60,7 @@ def update_integrated(poem_id):
return FAIL

if success:
print(f"Updated status in '{poem_md}' to Integrated")
return update_readme.update_readme()
else:
return FAIL
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/update_integrated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,20 @@ jobs:
- name: Notify slack
uses: act10ns/[email protected]
env:
POEM_ID: ${{ github.event.inputs.poem_integrated }}
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
message: |
Status of $POEM_ID transitioned to `Integrated`.
Status of ${{ github.event.inputs.poem_integrated }} was transitioned to `Integrated`.
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
if: success()

- name: Notify slack
uses: act10ns/[email protected]
env:
POEM_ID: ${{ github.event.inputs.poem_integrated }}
with:
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status }}
message: |
Status of $POEM_ID WAS NOT transitioned to `Integrated`.
Status of ${{ github.event.inputs.poem_integrated }} WAS NOT transitioned to `Integrated`.
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
if: failure()

0 comments on commit f4ed57c

Please sign in to comment.