Skip to content

feat: added variables to logs #33

feat: added variables to logs

feat: added variables to logs #33

Workflow file for this run

name: Self Test Codacy Label Action
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review, edited]
jobs:
label-pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Run action from repository
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
include-drafts: false
bots: true
required-title-keywords: "^feat:, test"
label-color: "FF5733"
- name: Verify label applied
if: always()
run: |
response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels")
echo "$response" | node -e "let data='';process.stdin.on('data',c=>data+=c).on('end',()=>{try{const labels=JSON.parse(data).map(l=>l.name);console.log(labels);}catch(err){console.error('Failed to parse labels',err);process.exit(1);}});"