mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Fixes git stale discord workflow (Again!!) (#95449)
## About The Pull Request This is suffering. Tries to fix [This](https://github.com/tgstation/tgstation/actions/runs/23323997716) which occurs after #95415 was merged. Apparently the output of the script had some secret information & invalid variables which it could not store causing the announce workflow to fail. So i filtered out only the essential components I wish i had a way to test this workflow locally on my fork repo but i can't. It's trial and error at this point. ## Changelog N/A
This commit is contained in:
@@ -40,7 +40,15 @@ jobs:
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
return JSON.parse('${{steps.stale.outputs.staled-issues-prs}}').filter(issue => !!issue.pull_request)
|
||||
const pull_requests = JSON.parse('${{steps.stale.outputs.staled-issues-prs}}')
|
||||
.filter(issue => !!issue.pull_request)
|
||||
.map(pr => ({
|
||||
title: pr.title,
|
||||
number: pr.number,
|
||||
html_url: pr.pull_request.html_url,
|
||||
}));
|
||||
|
||||
return JSON.stringify(pull_requests)
|
||||
|
||||
announce:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -64,7 +72,7 @@ jobs:
|
||||
steps.secrets_set.outputs.SECRETS_ENABLED
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
title: ${{ matrix.pull_request.user.login }} - ${{ matrix.pull_request.title }}
|
||||
title: ${{ matrix.pull_request.title }}
|
||||
message: ${{ format('**Pull Request \#{0} automatically marked as stale.**', matrix.pull_request.number) }}
|
||||
include_image: false
|
||||
show_author: false
|
||||
|
||||
Reference in New Issue
Block a user