Skip to content

Commit dbfd419

Browse files
ci: add the apify-factory review workflow (#2329)
Lets apify-factory review pull requests here and approve the trivial ones. - Requesting `apify-factory` as a reviewer runs an AI review; when every gate passes, the review finds nothing and a second model agrees, it approves instead of commenting. - A push that changes the code, removing the request, or going back to draft withdraws the bot's own approval. - This repository's `factory_auto_approve` property is true, which is what allows approvals, and mtrunkat becomes the code owner of the workflow file. - These paths are never auto-approved here, on top of the defaults every repository has. An agent proposed them from the repository's layout; edit the list in the workflow like any other code. | Path | Why | Files | | --- | --- | --- | | `.rules.md` | Instruction file for coding agents (mirrors CLAUDE.md); changes steer automated agents and must be reviewed by a person. | 1 | | `src/crawlee/_utils/resources/public_suffix_list.dat` | Vendored Public Suffix List snapshot that should change only via scripts/update_public_suffix_list.py; hand edits can't be verified from the diff. | 1 | | `website/versioned_docs/**/api-typedoc.json` | Generated API reference snapshots for released doc versions; they should change only through the doc generator, never by hand. | 2 | Refs https://github.com/apify/ai-developer/blob/main/actions/auto-approve/README.md
1 parent 419ef5c commit dbfd419

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
/docs/*.md @TC-MO
44
/docs/*.mdx @TC-MO
5+
/.github/workflows/factory_review.yaml @mtrunkat
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: apify-factory review (AI review, and auto-approval)
2+
3+
# Calls the review and auto-approval pipeline in apify/ai-developer. Approvals additionally need the
4+
# repository's `factory_auto_approve` custom property set to true.
5+
on:
6+
# Taken from the default branch, never from the pull request, so a pull request cannot rewrite
7+
# its own review pipeline. Pull request code is never checked out or executed.
8+
pull_request_target:
9+
types:
10+
- review_requested
11+
- review_request_removed
12+
- converted_to_draft
13+
- ready_for_review
14+
- synchronize
15+
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
20+
jobs:
21+
factory-review:
22+
uses: apify/ai-developer/.github/workflows/_factory_review.yaml@main
23+
secrets: inherit
24+
# Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the
25+
# repository's layout when this workflow was added; edit them like any other code.
26+
with:
27+
policy: |
28+
{
29+
"denyGlobs": [
30+
".rules.md",
31+
"src/crawlee/_utils/resources/public_suffix_list.dat",
32+
"website/versioned_docs/**/api-typedoc.json"
33+
]
34+
}

0 commit comments

Comments
 (0)