Docs feedback: push rule branch regex in Agent Platform troubleshooting matches duo/fixme
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
doc/user/duo_agent_platform/troubleshooting.md, section Configure push rules to allow a service account (lines 96-99 on master, VERSION 19.5.0-pre), says:
- Allow the
duo/feature/branch prefix:
- Add a regular expression that allows branches starting with ^duo/(fix|feature|refactor|docs/).* For example:
^(duo/feature)/.*$
The slash is inside the alternation for docs only. As written, the pattern:
- also matches branches with no separator after the name, such as
duo/fixmeandduo/featurex - requires
duo/docs/but onlyduo/fix,duo/featureandduo/refactorfor the other three
The example on the next line (^(duo/feature)/.*$) and the step's own heading (the duo/feature/ prefix) put the slash after the name. Someone who pastes the pattern into Branch name gets a looser rule than the step describes.
The pattern is also not in code formatting, unlike the example below it.
Further details
Checked with Ruby:
| Branch | Docs pattern ^duo/(fix|feature|refactor|docs/).* |
Proposed ^duo/(fix|feature|refactor|docs)/.* |
|---|---|---|
duo/fix/x |
match | match |
duo/docs/x |
match | match |
duo/fixme |
match | no match |
duo/featurex |
match | no match |
Proposal
Change line 98 to:
1. Add a regular expression that allows branches starting with `duo/fix/`, `duo/feature/`, `duo/refactor/` or `duo/docs/`: `^duo/(fix|feature|refactor|docs)/.*`Optionally, rename the step heading from "Allow the duo/feature/ branch prefix" to "Allow the duo/ branch prefixes", because the pattern covers four prefixes.
Who can address the issue
Any contributor. One-line docs change.