diff --git a/src/content/docs/workflow/actions/dismiss_reviews.mdx b/src/content/docs/workflow/actions/dismiss_reviews.mdx index 927d4ff3f9..e945b0c2d8 100644 --- a/src/content/docs/workflow/actions/dismiss_reviews.mdx +++ b/src/content/docs/workflow/actions/dismiss_reviews.mdx @@ -13,3 +13,21 @@ reviews in your pull request workflow. ## Parameters + +## Examples + +### Dismiss Approvals When New Commits Are Pushed + +Keep approvals fresh by removing them whenever new commits are pushed, while +leaving change requests in place. + +```yaml +pull_request_rules: + - name: dismiss stale approvals + conditions: + - base = main + actions: + dismiss_reviews: + approved: true + changes_requested: false +``` diff --git a/src/content/docs/workflow/actions/rebase.mdx b/src/content/docs/workflow/actions/rebase.mdx index 6dec315824..12cf146bdd 100644 --- a/src/content/docs/workflow/actions/rebase.mdx +++ b/src/content/docs/workflow/actions/rebase.mdx @@ -11,7 +11,7 @@ up-to-date with the latest changes from the base branch. :::note You do not need to use this action if you use the [merge - queue](/merge-queue). The merge queue automatically update the pull requests + queue](/merge-queue). The merge queue automatically updates the pull requests it processes as necessary, making sure they are tested with up-to-date code before being merged. ::: @@ -25,4 +25,21 @@ up-to-date with the latest changes from the base branch. ## Parameters - + + +## Examples + +### Autosquash Fixup Commits + +Rebase a pull request and fold in any `fixup!`, `squash!`, or `amend!` commits +once it is ready to merge. + +```yaml +pull_request_rules: + - name: autosquash fixup commits + conditions: + - label = ready-to-merge + actions: + rebase: + autosquash: true +``` diff --git a/src/content/docs/workflow/actions/request_reviews.mdx b/src/content/docs/workflow/actions/request_reviews.mdx index 50d22e7919..de33ccc36f 100644 --- a/src/content/docs/workflow/actions/request_reviews.mdx +++ b/src/content/docs/workflow/actions/request_reviews.mdx @@ -16,3 +16,21 @@ certain pull requests. ## Parameters + +## Examples + +### Request a Review for Sensitive Files + +Ask the security team to review whenever a pull request changes files under +`security/`. + +```yaml +pull_request_rules: + - name: request a security review + conditions: + - files ~= ^security/ + actions: + request_reviews: + teams: + - security +```