Skip to content

fix(broadcastclients): use structured logging for startup error #353

fix(broadcastclients): use structured logging for startup error

fix(broadcastclients): use structured logging for startup error #353

---
name: Close trivial PRs
on:
pull_request_target:
types: [labeled]
jobs:
close-trivial-pr:
if: github.event.label.name == 'trivial'
runs-on: ubuntu-4
permissions:
pull-requests: write
steps:
- name: Fetch CONTRIBUTING.md snippet
id: snippet
env:
REPO: ${{ github.repository }}
run: |
SNIPPET=$(curl -sSfL "https://raw.githubusercontent.com/${REPO}/refs/heads/master/CONTRIBUTING.md" \
| sed -n '/<!-- start-trivial-prs -->/,/<!-- end-trivial-prs -->/p' \
| sed '/<!--.*-->/d')
# Use GitHub Actions heredoc-style output to preserve multiline content
echo "snippet<<EOF" >> $GITHUB_OUTPUT
echo "$SNIPPET" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Comment and Close PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
REPO=${{ github.repository }}
DEF_BRANCH=${{ github.event.repository.default_branch }}
SNIPPET="${{ steps.snippet.outputs.snippet }}"
gh pr close $PR_NUMBER --repo $REPO --comment \
"Thank you for your contribution. However, this PR has been automatically closed because \
it was labeled as **trivial**. As stated in our [CONTRIBUTING.md](../blob/${DEF_BRANCH}/CONTRIBUTING.md):
---
${SNIPPET}
---
We appreciate meaningful contributions!"