Skip to content

Commit a7a05c5

Browse files
abhizipstackclaude
andcommitted
fix: address Greptile review — JSON injection, close-pr-message, exempt labels
- Fix JSON injection in Slack payload — build message in run step to avoid malformed JSON from release names with quotes - Add close-pr-message for stale PRs — contributors get context - Add bug to exempt-pr-labels — match issue exemptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a7cd5f7 commit a7a05c5

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/release-notification.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: ${{ secrets.SLACK_WEBHOOK_URL != '' }}
1111
steps:
12+
- name: Build Slack message
13+
id: message
14+
run: |
15+
TAG="${{ github.event.release.tag_name }}"
16+
NAME=$(echo '${{ toJSON(github.event.release.name) }}' | jq -r '.')
17+
URL="${{ github.event.release.html_url }}"
18+
echo "text=🚀 *Visitran ${TAG}* released! ${NAME} <${URL}|View Release Notes>" >> "$GITHUB_OUTPUT"
19+
1220
- name: Post to Slack
1321
uses: slackapi/slack-github-action@v2.1.0
1422
with:
1523
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
1624
webhook-type: incoming-webhook
1725
payload: |
1826
{
19-
"text": "🚀 *Visitran ${{ github.event.release.tag_name }}* released!\n\n${{ github.event.release.name }}\n\n<${{ github.event.release.html_url }}|View Release Notes>"
27+
"text": "${{ steps.message.outputs.text }}"
2028
}

.github/workflows/stale.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
close-issue-message: >
2828
This issue was closed because it has been inactive for
2929
too long. Feel free to reopen if it is still relevant.
30+
close-pr-message: >
31+
This pull request was closed because it has been inactive
32+
for too long. Feel free to reopen if it is still relevant.
3033
stale-issue-label: "stale"
3134
stale-pr-label: "stale"
3235
days-before-stale: 60
3336
days-before-close: 7
3437
exempt-issue-labels: "pinned,security,bug"
35-
exempt-pr-labels: "pinned,security"
38+
exempt-pr-labels: "pinned,security,bug"
3639
exempt-all-milestones: true

0 commit comments

Comments
 (0)