What this section is for
Create a policy, test it on a specific pull request and inspect the run result. The current form creates a draft policy that adds a comment when run manually. A separate form selects reviewers for file paths. Policies and rules created through other means may contain additional settings; editing basic fields preserves them.
When to use
- When you need to add the same comment to several pull requests.
- When you need a reviewer list for particular parts of the code.
- When you want to check why an action ran, was skipped or failed.
Quick start
- 1Create a policy with a name, repositories and comment text. Leave dry run enabled.
- 2Open the policy run form, enter the full repository name and pull request number, and run a preview first.
- 3Inspect the result and conditions in run history. A dry run does not change the pull request.
- 4To post the comment, turn off dry run in both the policy and run form. Run the action manually and check the result at your Git provider.
Key settings
| Setting | What it does | How to use it | Common mistake |
|---|---|---|---|
| Dry run | Shows what the policy would do without changing the pull request. | Check a preview on a specific pull request before a real run. | Turning dry run off in the run form while leaving it enabled on the policy. |
| Repositories and comment | Limits the repositories for a new policy and sets the comment to post. | Start with one repository and check the text before saving. A new policy does not post the same comment twice. | Expecting a saved draft to run automatically when a pull request opens. |
| Reviewer rule | Sets file paths, reviewer logins and the number of reviewers. | Choose reviewers who know those files. New rules start inactive; check them before enabling. The pull request author is excluded. | Entering display names instead of Git provider logins, or expecting load balancing from a form that selects specific people. |
Usage example
Scenario: Pull requests in one repository need a reminder to check a migration.
- 1Create a policy with the repository and reminder text.
- 2Enter a test pull request number and run a preview. Inspect the result in run history.
- 3Turn off dry run in both places and run the policy. Check that the comment appears on the pull request.
What this shows: You have tested the policy on a specific change and can repeat the manual run for other matching pull requests.
FAQ
What does a skipped run mean?
A condition was not met or the action was unnecessary, for example because the comment already exists. Open the run result for details. Skipped actions and errors are shown separately.
Why did nothing happen when a pull request opened?
New policies from this form run manually. Open the run form and enter the repository and pull request number. Saving a policy does not enable event-based execution.
Why was my real run still a preview?
Dry run applies when enabled on either the policy or the run form. Turn it off in both places for a real action. The connection token must also have permission to perform the action.
Tips
- This section is in beta. Check preview results and error history before using it on important repositories.
- Editing an existing policy preserves its actions and conditions. Review them before execution: they may differ from the comment action created by the new-policy form.