The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs - update docs workflow (#66096)
Jeff Bruemmer7c8a8f36941c
diff --git a/.claude/skills/docs-review/SKILL.md b/.claude/skills/docs-review/SKILL.mdindex 679af9ab11a..42a908841b0 100644--- a/.claude/skills/docs-review/SKILL.md+++ b/.claude/skills/docs-review/SKILL.md@@ -141,6 +141,7 @@ When posting to GitHub (PR mode), use the **pending review workflow**:5. **Submit the review**: Use `mcp__github__submit_pending_pull_request_review` to publish all comments at once- Use event type `"COMMENT"` (NOT "REQUEST_CHANGES") to make it non-blocking+ - **Do NOT include a body message** - Leave the body empty or omit it entirely- All comments will appear together as one cohesive review**Comment format example:**@@ -156,6 +157,7 @@ This uses backticks for the UI element. Use **bold** instead: **Filter** not `Fi- Always start the comment body with `**Issue N: [Brief title]**`- **MUST add all comments in parallel in a single response** - Do NOT add them one after another in separate responses- Do NOT output a summary message to the conversation - only post GitHub review comments+- When submitting the review, do NOT include a body parameter (or leave it empty) to avoid cluttering the PR with summary text- The review will appear as a single review with multiple comments when submitted## Final checkdiff --git a/.github/workflows/claude-docs-review.yml b/.github/workflows/claude-docs-review.ymlindex 01c1137545d..18f080bb054 100644--- a/.github/workflows/claude-docs-review.yml+++ b/.github/workflows/claude-docs-review.yml@@ -34,22 +34,6 @@ jobs:# Make sure the value of GITHUB_TOKEN will not be persisted in repo's configpersist-credentials: false- - name: Delete old Claude docs review comments- env:- GH_TOKEN: ${{ github.token }}- REPO: ${{ github.repository }}- PR_NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}- shell: bash- run: |- # Delete old reviews from the bot (reviews contain inline comments)- old_review_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/reviews" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')- echo "Deleting reviews: $old_review_ids"- for id in $old_review_ids; do- # Note: This deletes the review and all associated comments- gh api -X DELETE "/repos/$REPO/pulls/$PR_NUMBER/reviews/$id"- echo "Deleted review $id"- done-- name: Generate GitHub App Token for Claudeuses: actions/create-github-app-token@v1id: claude-app-token@@ -59,11 +43,49 @@ jobs:permission-contents: read # Required for reading repository files and PR diffspermission-pull-requests: write # Required for creating inline comments and PR comments+ - name: Delete old Claude docs review comments+ env:+ GH_TOKEN: ${{ steps.claude-app-token.outputs.token }}+ REPO: ${{ github.repository }}+ PR_NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}+ shell: bash+ run: |+ # Delete pending reviews first (these can be deleted entirely)+ pending_review_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/reviews" --jq '.[] | select(.user.login=="metabase-bot[bot]" and .state=="PENDING") | .id')+ if [ -n "$pending_review_ids" ]; then+ echo "Deleting pending reviews: $pending_review_ids"+ for id in $pending_review_ids; do+ gh api -X DELETE "/repos/$REPO/pulls/$PR_NUMBER/reviews/$id"+ echo "Deleted pending review $id"+ done+ fi++ # Delete individual inline comments from submitted reviews (can't delete the review itself)+ old_line_comment_ids=$(gh api "/repos/$REPO/pulls/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')+ if [ -n "$old_line_comment_ids" ]; then+ echo "Deleting line comments: $old_line_comment_ids"+ for id in $old_line_comment_ids; do+ gh api -X DELETE "/repos/$REPO/pulls/comments/$id"+ echo "Deleted line comment $id"+ done+ fi++ # Delete top-level review comments+ old_top_level_comment_ids=$(gh api "/repos/$REPO/issues/$PR_NUMBER/comments" --jq '.[] | select(.user.login=="metabase-bot[bot]") | .id')+ if [ -n "$old_top_level_comment_ids" ]; then+ echo "Deleting top-level comments: $old_top_level_comment_ids"+ for id in $old_top_level_comment_ids; do+ gh api -X DELETE "/repos/$REPO/issues/comments/$id"+ echo "Deleted top-level comment $id"+ done+ fi+- uses: anthropics/claude-code-action@v1timeout-minutes: 10with:anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}github_token: ${{ steps.claude-app-token.outputs.token }}+ show_full_output: trueprompt: |REPO: ${{ github.repository }}PR NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}@@ -75,4 +97,4 @@ jobs:DO NOT post any comments confirming that something is correct - only post comments for style violations or concerns.claude_args: |- --allowedTools "mcp__github__create_pending_pull_request_review,mcp__github__get_pull_request_diff,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,Bash(gh pr view:*)"+ --allowedTools "Skill,mcp__github__get_pull_request,mcp__github__get_pull_request_files,mcp__github__create_pending_pull_request_review,mcp__github__get_pull_request_diff,mcp__github__add_comment_to_pending_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__delete_pending_pull_request_review,mcp__github__submit_pending_pull_request_review"