lohr icon indicating copy to clipboard operation
lohr copied to clipboard

Support git push options

Open ambroisie opened this issue 3 years ago • 4 comments

Motivating example: Sourcehut's push options includes a way to set the repository's visibility when pushing to it. Lohr could either try to be smart and set the corresponding option automatically when pushing a repository, or it should be configurable using the .lohr file.

I'm more partial to it being set as a general config, as I would rather avoid having to write .lohr files.

ambroisie avatar Apr 08 '21 13:04 ambroisie

How would this work for a general config option, though? Setting all repos to the same visibility doesn't sound like what we want

alarsyo avatar Apr 08 '21 21:04 alarsyo

I was thinking that if a repo is marked as private, it would push it as private.

ambroisie avatar Apr 08 '21 21:04 ambroisie

So something like an explicit list of private repos ?

private_repos:
- "full/name"

Edit: probably something more generic would be more appropriate, so:

push_options:
- option: "visibility=private"
  remotes:
  - "[email protected]:full/name"

alarsyo avatar Apr 08 '21 22:04 alarsyo

No, you can just look at the visibility of a repository by looking at the payload from the webhook.

ambroisie avatar Apr 09 '21 05:04 ambroisie