Skip to content

refactor(Peripheral): use native power norm #6221

refactor(Peripheral): use native power norm

refactor(Peripheral): use native power norm #6221

name: Issue Tracker
on:
issues:
types: [closed, reopened]
pull_request:
types: [closed, opened]
# NOTE: pull_request_review was removed to reduce excessive workflow runs.
# Every review submission (including comment-only) triggered a full
# checkout + Claude Code invocation, even though the job filter skipped
# comment-only reviews. The value (posting "approved" / "changes requested"
# notes on tracking issues via Playbook C) did not justify the cost.
# Re-enable if lightweight tracking of review states is needed.
# Per-event concurrency: each PR/issue gets its own queue to avoid
# GitHub's pending-queue depth limit (which cancels middle runs when
# many PRs merge simultaneously). The risk of concurrent writes to the
# same tracking issue body is low and acceptable vs losing updates.
#
concurrency:
group: issue-tracker-${{ github.event.pull_request.number || github.event.issue.number || github.run_id }}
cancel-in-progress: false
jobs:
track:
# Skip: forks (no secrets), closed-but-not-completed issues, closed-but-not-merged PRs
if: |
vars.CLAUDE_REVIEW_ENABLED != 'false' &&
(
(
github.event_name == 'issues' &&
(github.event.issue.state_reason == 'completed' || github.event.action == 'reopened')
) ||
(
github.event_name == 'pull_request' &&
!github.event.pull_request.head.repo.fork &&
(github.event.action != 'closed' || github.event.pull_request.merged == true)
)
)
runs-on: ubuntu-latest
env:
CLAUDE_CODE_PROVIDER: ${{ vars.CLAUDE_CODE_PROVIDER || 'anthropic' }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
ANTHROPIC_BASE_URL: ${{ vars.ANTHROPIC_BASE_URL }}
CLAUDE_OPUS_MODEL: ${{ vars.CLAUDE_OPUS_MODEL }}
CLAUDE_SONNET_MODEL: ${{ vars.CLAUDE_SONNET_MODEL }}
permissions:
contents: read
pull-requests: read
issues: write
id-token: write
steps:
- name: Check Claude review switch
id: claude-switch
env:
CLAUDE_REVIEW_ENABLED: ${{ vars.CLAUDE_REVIEW_ENABLED }}
run: |
if [ "$CLAUDE_REVIEW_ENABLED" = "false" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping issue tracker: CLAUDE_REVIEW_ENABLED=false"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Checkout repository
if: steps.claude-switch.outputs.skip != 'true'
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Checkout trusted automation
if: steps.claude-switch.outputs.skip != 'true'
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.base.ref || github.event.repository.default_branch }}
path: .trusted-actions
fetch-depth: 1
- name: Run Claude Code
if: steps.claude-switch.outputs.skip != 'true'
id: claude
uses: LionSR/agent-ci-actions@v1
with:
provider: ${{ env.CLAUDE_CODE_PROVIDER }}
model-tier: sonnet
allowed-bots: '*'
allowed_tools_preset: tracking-issue-sync
allowed_tools_preset_map_file: .trusted-actions/.github/allowed-tools.json
claude-prompt-file: .trusted-actions/.github/prompts/tracking-issue-sync-prompt.md
claude-prompt-context: |
Event: ${{ github.event_name }} / ${{ github.event.action }}
Repository: ${{ github.repository }}
Triggered by: ${{ github.event.sender.login }}
${{ github.event_name == 'issues' && format('Issue number: #{0}', github.event.issue.number) || '' }}
${{ github.event_name == 'issues' && format('Issue title: {0}', github.event.issue.title) || '' }}
${{ github.event_name == 'issues' && format('Issue labels: {0}', join(github.event.issue.labels.*.name, ', ')) || '' }}
${{ github.event_name != 'issues' && format('PR number: #{0}', github.event.pull_request.number) || '' }}
${{ github.event_name != 'issues' && format('PR title: {0}', github.event.pull_request.title) || '' }}
${{ github.event_name != 'issues' && format('PR labels: {0}', join(github.event.pull_request.labels.*.name, ', ')) || '' }}
${{ github.event_name != 'issues' && format('PR state: {0}', github.event.pull_request.state) || '' }}
${{ github.event_name != 'issues' && format('PR draft: {0}', github.event.pull_request.draft) || '' }}
${{ github.event_name != 'issues' && format('Author: {0}', github.event.pull_request.user.login) || '' }}
${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && format('Merged by: {0}', github.event.pull_request.merged_by.login) || '' }}
${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && format('Base branch: {0}', github.event.pull_request.base.ref) || '' }}
${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && format('Head branch: {0}', github.event.pull_request.head.ref) || '' }}
${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && format('Base SHA: {0}', github.event.pull_request.base.sha) || '' }}
${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && format('Head SHA: {0}', github.event.pull_request.head.sha) || '' }}