Package: devscripts
Version: 2.25.1
Severity: wishlist

Dear Maintainer,

I just stumbled upon the 'protected_branches' subcommand, and it
produces output like so:
```

```
 Branch               | Merge                     | Push
 master               | Maintainers               | Developers + Maintainers
```

that's nice for human readers (although it would be even nicer if the
heading line would be separated from the data lines, with dashes or
similar)

however it makes the output complicated to parse in scripts or the
like.

otoh, the sister subcommand 'protect_branch' uses a very terse syntax.
e.g. to set the branch protection to the values seen above you would
use:

```sh
salsa protect_branch ${project} m d
```

I would therefore suggest to add a general flag `--machine-parsable` or
the like, which produces output (for query operations) that can be
easily re-used for the related set operations:

```sh
$ salsa protected_branches --machine-parsable ${project}
master m d
```

afaict, a number of query operations could make use of this flag.

gfdmasr
IOhannes

Reply via email to