Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Change parameter ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
slimslenderslacks committed Sep 11, 2020
1 parent 38f2d0a commit a704cb3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ var convergeBranchRules = async (request, repo, branch) => {
... {required_pull_request_reviews: configureReviews(request)},
... {restrictions: null},
... (request.required_linear_history && {required_linear_history: request.required_linear_history}),
... (request.allow_force_pushes && {allow_force_pushes: request.allow_force_pushes})
... (request.allow_force_pushes && {allow_force_pushes: request.allow_force_pushes}),
... (request.allow_deletions && {allow_deletions: request.allow_deletions})
}
);
}
Expand Down
50 changes: 32 additions & 18 deletions skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,32 @@ parameters:
name: branchPattern
placeHolder: "main,default"
required: true
- stringArray:
name: required_status_checks
displayName: Required Status Checks
description: Specify which status checks must pass before branches can be merged
required: false
- boolean:
description: Enforce branch protection rules for repostitory administrators. Set to true to enforce required status checks for repository administrators.
displayName: Enforce for Administrators
name: enforce_admins
- int:
name: required_approving_review_count
displayName: Require pull request reviews before merging
description: Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
maximum: 6
minimum: 1
required: false
- boolean:
name: dismiss_stale_reviews
displayName: Dismiss Stale Reviews
displayName: "Require pull request reviews: Dismiss Stale Reviews"
description: Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
required: false
- boolean:
name: require_code_owner_reviews
displayName: Require Code Owner Reviews
displayName: "Require pull request reviews: Require Code Owner Reviews"
description: Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.
required: false
- int:
name: required_approving_review_count
displayName: Required Aproving Review Count
description: Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
- stringArray:
name: required_status_checks
displayName: Required Status Checks
description: Specify which status checks must pass before branches can be merged. See [github documentation](https://docs.github.com/en/github/administering-a-repository/about-required-status-checks).
required: false
- boolean:
name: allow_force_pushes
displayName: Allow Force Pushes
description: Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes.
name: required_signed_commits
displayName: Require signed commits
description: Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Your repository must allow squash merging or rebase merging before you can enable a linear commit history.
default: false
required: false
- boolean:
Expand All @@ -75,6 +72,23 @@ parameters:
description: Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Your repository must allow squash merging or rebase merging before you can enable a linear commit history.
default: false
required: false
- boolean:
description: Enforce branch protection rules for repostitory administrators. Set to true to enforce required status checks for repository administrators.
displayName: Include administrators
name: enforce_admins
required: false
- boolean:
name: allow_force_pushes
displayName: Allow force pushes
description: Permit force pushes for all users with push access.
default: false
required: false
- boolean:
name: allow_deletions
displayName: Allow deletions
description: Allow users with push access to delete matching branches.
default: false
required: false
- schedule:
description: Keep repository branch protection configurations current. If set, repository branch protection configurations will be checked and updated to this configuration on the set schedule.
displayName: Schedule
Expand Down

0 comments on commit a704cb3

Please sign in to comment.