|
| 1 | +name: Review Renovate |
| 2 | + |
| 3 | +permissions: {} |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + types: |
| 8 | + - opened |
| 9 | + - edited |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + review: |
| 17 | + if: github.event.pull_request.user.login == 'renovate[bot]' |
| 18 | + timeout-minutes: 30 |
| 19 | + runs-on: ubuntu-latest |
| 20 | + permissions: |
| 21 | + contents: read |
| 22 | + pull-requests: write |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 25 | + with: |
| 26 | + persist-credentials: false |
| 27 | + |
| 28 | + - uses: anthropics/claude-code-action/base-action@15db2b3c79c0681556c056e9bc3f61fd3fc0347d # v0.0.54 |
| 29 | + with: |
| 30 | + anthropic_api_key: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
| 31 | + allowed_tools: 'Bash(gh pr diff:*),Bash(gh pr comment:*),WebFetch(domain:github.com),WebFetch(domain:raw.githubusercontent.com)' |
| 32 | + prompt: | |
| 33 | + ## Context |
| 34 | +
|
| 35 | + <pull_request> |
| 36 | + <number>${{ github.event.pull_request.number }}</number> |
| 37 | + <title>${{ github.event.pull_request.title }}</title> |
| 38 | + <body> |
| 39 | + ${{ github.event.pull_request.body }} |
| 40 | + </body> |
| 41 | + </pull_request> |
| 42 | +
|
| 43 | + ## Your Role |
| 44 | +
|
| 45 | + Conduct a detailed review of the Renovate Pull Request and evaluate the safety of merging. |
| 46 | +
|
| 47 | + **Important**: Do not execute local tests or build commands. This review should be conducted based solely on static analysis of changes, release notes, and impact assessment. |
| 48 | +
|
| 49 | + ### Execution Steps |
| 50 | +
|
| 51 | + 1. **Pull Request Analysis** |
| 52 | + - Review the Pull Request information provided as context |
| 53 | + - Retrieve the Pull Request diff using `gh pr diff ${{ github.event.pull_request.number }}` |
| 54 | + - Identify target packages and version changes |
| 55 | +
|
| 56 | + 2. **Release Content Investigation** |
| 57 | + - Review release notes and CHANGELOG of the target package |
| 58 | + - Understand breaking changes, new features, and bug fixes |
| 59 | + - Check for security-related fixes |
| 60 | +
|
| 61 | + 3. **Codebase Impact Analysis** |
| 62 | + - Search for usage locations of the target package in the current codebase |
| 63 | + - Verify the need for modifications due to API changes |
| 64 | + - Investigate impact on other packages due to dependency changes |
| 65 | + - Check impact on configuration files and environment settings |
| 66 | +
|
| 67 | + 4. **Safety Assessment (3 Levels)** |
| 68 | + - **Safe**: Backward compatibility is maintained, immediately mergeable |
| 69 | + - **Needs Manual Migration**: Manual code fixes or configuration changes required |
| 70 | + - **Not Safe**: Major breaking changes or security risks present |
| 71 | +
|
| 72 | + 5. **Post Review Results as Comment** |
| 73 | + - Post detailed analysis results as a comment using `gh pr comment ${{ github.event.pull_request.number }} --body '## Renovate PR Review Results ...'` |
| 74 | +
|
| 75 | + ### Report Format |
| 76 | +
|
| 77 | + ```markdown |
| 78 | + ## Renovate PR Review Results |
| 79 | +
|
| 80 | + ### ⚖️ Safety Assessment: |
| 81 | + [✅ Safe | ⚠️ Needs Manual Migration | ❌ Not Safe] |
| 82 | +
|
| 83 | + ### 🔍 Release Content Analysis |
| 84 | + - [Major changes] |
| 85 | + - [Breaking changes] |
| 86 | + - [Security fixes] |
| 87 | +
|
| 88 | + ### 🎯 Impact Scope Investigation |
| 89 | + - [Usage location identification results] |
| 90 | + - [Impact on other dependencies] |
| 91 | +
|
| 92 | + ### 💡 Recommended Actions |
| 93 | + - [Required modification work] |
| 94 | + - [Specific response methods] |
| 95 | +
|
| 96 | + ### 🔗 Reference Links |
| 97 | + - [Release notes] |
| 98 | + - [CHANGELOG] |
| 99 | + ``` |
0 commit comments