Skip to content

Commit 07d6b86

Browse files
authored
chore: add auto-approve bot (#1320)
Adds an [auto approve configuration](https://github.com/googleapis/repo-automation-bots/blob/master/packages/auto-approve/README.md) to automatically approve the PRs that update discovery artifacts. Only PRs that match these conditions will be approved: - PR Author is `yoshi-code-bot` - PR Title is `chore: Update discovery artifacts` - Files changed limited to the following `docs/dyn/index.md` , `docs/dyn/*.html"` or `googleapiclient/discovery_cache/documents/*.json`
1 parent 1f32aa8 commit 07d6b86

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88
* @googleapis/yoshi-python
99

1010
# The python-samples-reviewers team is the default owner for samples changes
11-
/samples/ @googleapis/python-samples-owners
11+
/samples/ @googleapis/python-samples-owners
12+
13+
.github/auto-approve.yml @googleapis/github-automation @googleapis/yoshi-python

.github/auto-approve.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/auto-approve
2+
3+
rules:
4+
5+
# incoming PRs from yoshi-code-bot
6+
- author: "yoshi-code-bot"
7+
8+
# Title for PRs from yoshi-code-bot MUST start with `chore: Update discovery artifacts`.
9+
# Title must be regex.
10+
title: "^chore: Update discovery artifacts"
11+
12+
# The only changed file paths in an incoming PR MUST be exactly
13+
# `"^docs/dyn/index.md$"` or follow either one of these patterns `"docs/dyn/*.html"`
14+
# or `"googleapiclient/discovery_cache/documents/*.json"` . These are
15+
# listed in regex. If this property is omitted, auto-approve bot will allow PRs
16+
# that match the author and title to merge, without checking the file paths.
17+
changedFiles:
18+
- "^docs/dyn/index.md$"
19+
- "^docs/dyn/.*\\.html$"
20+
- "^googleapiclient/discovery_cache/documents/.*\\.json$"

0 commit comments

Comments
 (0)