Skip to content

Commit 25325de

Browse files
authored
backtracking 2 (#198)
1 parent b688f8b commit 25325de

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • .github/actions/github/branch-protection/lock

.github/actions/github/branch-protection/lock/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ inputs:
2828
description: 'When true, sets required_pull_request_reviews to null (removes PR review requirement). Use temporarily before automated merges so the merge API is not blocked. When false (default), PR reviews are required as configured.'
2929
required: false
3030
default: 'false'
31+
required-linear-history:
32+
description: 'When true, enforces linear history (no merge commits). When false (default), merge commits are allowed. Set to false before automated merges that create merge commits.'
33+
required: false
34+
default: 'false'
3135

3236
runs:
3337
using: composite
@@ -48,6 +52,7 @@ runs:
4852
--argjson enforce_admins "$ENFORCE_ADMINS" \
4953
--argjson lock_branch '${{ inputs.lock-branch }}' \
5054
--argjson skip_reviews '${{ inputs.skip-pull-request-reviews }}' \
55+
--argjson required_linear_history '${{ inputs.required-linear-history }}' \
5156
'{
5257
"required_status_checks": null,
5358
"enforce_admins": $enforce_admins,
@@ -59,7 +64,8 @@ runs:
5964
"restrictions": null,
6065
"allow_force_pushes": false,
6166
"allow_deletions": false,
62-
"lock_branch": $lock_branch
67+
"lock_branch": $lock_branch,
68+
"required_linear_history": $required_linear_history
6369
}')
6470
6571
if ! echo "$PAYLOAD" | gh api --method PUT /repos/${{ github.repository }}/branches/${{ inputs.branch }}/protection --input -; then

0 commit comments

Comments
 (0)