Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ controller_repo:
# Reaction approvers must add to authorise provisioning.
approval_reaction: "+1"

# Configuration changes (dependabot.yml, templates, CODEOWNERS) are applied via
# pull request rather than direct push. Required because branch protection
# (PR #19) blocks direct commits to default branches.
change_strategy:
use_pull_requests: true
pr_title: "[temper] Configuration update"
pr_body: |
Automated configuration update from the Temper bot.

Review the changes and merge if they match the org standard.
pr_labels:
- automation
- dependencies

auto_merge:
enabled: true
on_dependabot: true
Expand Down
14 changes: 14 additions & 0 deletions src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ export function validateConfig(config) {
}
}

if (config.change_strategy !== undefined) {
const cs = config.change_strategy;
if (typeof cs !== 'object' || cs === null) {
errors.push('change_strategy must be an object');
} else {
if (cs.use_pull_requests !== undefined && typeof cs.use_pull_requests !== 'boolean') {
errors.push('change_strategy.use_pull_requests must be a boolean');
}
if (cs.pr_labels !== undefined && !Array.isArray(cs.pr_labels)) {
errors.push('change_strategy.pr_labels must be an array');
}
}
}

if (config.controller_repo !== undefined) {
const cr = config.controller_repo;
if (typeof cr !== 'object' || cr === null) {
Expand Down
Loading