|
1 | 1 | name: apify-factory review (AI review, and auto-approval) |
2 | 2 |
|
3 | 3 | # Calls the apify-factory review and auto-approval pipeline (apify/ai-developer, wired up in |
4 | | -# apify/workflows). A pull request is reviewed when apify-factory is requested; with the |
| 4 | +# apify/actions). A pull request is reviewed when apify-factory is requested; with the |
5 | 5 | # repository's `factory_auto_review` custom property set to true, also every ready pull request when |
6 | 6 | # it opens and after every push that changes its content. Approvals additionally need the |
7 | 7 | # repository's `factory_auto_approve` custom property set to true. |
@@ -40,20 +40,34 @@ concurrency: |
40 | 40 |
|
41 | 41 | jobs: |
42 | 42 | factory-review: |
43 | | - uses: apify/workflows/.github/workflows/factory_review.yaml@0a1eaf3d3b67be2e8c15b2fc989168721809c8e2 # v1.4.1 |
44 | | - # The three secrets the pipeline declares, instead of every secret this repository can read. |
45 | | - secrets: |
46 | | - APIFY_FACTORY_GITHUB_TOKEN: ${{ secrets.APIFY_FACTORY_GITHUB_TOKEN }} |
47 | | - ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW: ${{ secrets.ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW }} |
48 | | - APIFY_FACTORY_CALLBACK_TOKEN: ${{ secrets.APIFY_FACTORY_CALLBACK_TOKEN }} |
49 | | - # Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the |
50 | | - # repository's layout when this workflow was added; edit them like any other code. |
51 | | - with: |
52 | | - policy: | |
53 | | - { |
54 | | - "denyGlobs": [ |
55 | | - "src/apify_client/_models.py", |
56 | | - "src/apify_client/_typeddicts.py", |
57 | | - "src/apify_client/_literals.py" |
58 | | - ] |
59 | | - } |
| 43 | + runs-on: ubuntu-latest |
| 44 | + timeout-minutes: 60 |
| 45 | + permissions: |
| 46 | + contents: read |
| 47 | + pull-requests: write |
| 48 | + # Proves to the core Actor that this run hands a review to a sandbox. |
| 49 | + id-token: write |
| 50 | + # Never cancel a running review: the action posts nothing from a cancelled run, which would leave |
| 51 | + # the request pending with no review. GitHub keeps one waiting run per group and replaces it with |
| 52 | + # a newer one. The group differs from the workflow's own, which would otherwise wait on this job. |
| 53 | + concurrency: |
| 54 | + group: factory-review-job-${{ github.event.pull_request.number }} |
| 55 | + cancel-in-progress: false |
| 56 | + steps: |
| 57 | + - name: apify-factory review |
| 58 | + uses: apify/actions/factory-review@994a3e5ec79a5575ac4d81365bab7549c9687c32 # v1.9.0 |
| 59 | + with: |
| 60 | + apify-factory-github-token: ${{ secrets.APIFY_FACTORY_GITHUB_TOKEN }} |
| 61 | + anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW }} |
| 62 | + apify-factory-callback-token: ${{ secrets.APIFY_FACTORY_CALLBACK_TOKEN }} |
| 63 | + factory-public-url: ${{ vars.FACTORY_PUBLIC_URL }} |
| 64 | + # Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the |
| 65 | + # repository's layout when this workflow was added; edit them like any other code. |
| 66 | + policy: | |
| 67 | + { |
| 68 | + "denyGlobs": [ |
| 69 | + "src/apify_client/_models.py", |
| 70 | + "src/apify_client/_typeddicts.py", |
| 71 | + "src/apify_client/_literals.py" |
| 72 | + ] |
| 73 | + } |
0 commit comments