Config

class wrgl.config.User(name=None, email=None)

User configuration, this corresponds to the user section in config.yaml. Learn more about configuration options.

In the context of a hosted repository, this holds information about the default user that perform automated actions such as updating reflog whenever the repository receive a push.

Variables
  • name (str) – default user’s name

  • email (str) – default user’s email

Method generated by attrs for class User.

class wrgl.config.Receive(deny_non_fast_forwards=None, deny_deletes=None)

Receive configuration, this corresponds to the receive section in config.yaml. Learn more about configuration options.

Variables
  • deny_non_fast_forwards (bool) – don’t allow non-fast-forward pushes, learn more here

  • deny_deletes (bool) – don’t allow ref deletion

Method generated by attrs for class Receive.

class wrgl.config.Branch(remote=None, merge=None)

Branch’s upstream configuration, this corresponds to the branch section in config.yaml. Learn more about configuration options.

This configuration is rarely useful for a hosted repository because most hosted repositories do not have upstreams.

Variables
  • remote (str) – upstream remote of the branch

  • merge (str) – upstream ref of the branch

Method generated by attrs for class Branch.

class wrgl.config.Auth(token_duration=None)

Authentication configuration, this corresponds to the auth section in config.yaml. Learn more about configuration options.

Variables

token_duration (str) – how long before a JWT token given by the /authenticate/ endpoint of Wrgld expire. This is a string in the format “72h3m0.5s”. Tokens last for 90 days by default.

Method generated by attrs for class Auth.

class wrgl.config.Pack(max_file_size=None)

Packfile configuration, this corresponds to the pack section in config.yaml. Learn more about configuration options.

Variables

max_file_size (int) – maximum packfile size in bytes

Method generated by attrs for class Pack.

class wrgl.config.Remote(url=None, fetch=None, push=None, mirror=None)

Remote configuration, this corresponds to the remote section in config.yaml. Learn more about configuration options.

This configuration is rarely useful in the context of hosted repositories, unless you want your upstreams to have upstreams themselves.

Variables
  • url (str) – url of the remote

  • fetch (list[str]) – list of refspec to automatically fetch from this upstream

  • push (list[str]) – list of refspec to automatically push to this upstream

  • mirror (bool) – whether this upstream should mirror the repository

Method generated by attrs for class Remote.

class wrgl.config.Config(user=None, remote=None, receive=None, branch=None, auth=None, pack=None)

Configurations as recorded in config.yaml, which can also be read/update via the /config/ endpoint. Learn more about configuration options.

Variables
  • user (User) – user configuration

  • remote (dict[str, Remote]) – mapping of remote configurations

  • receive (Receive) – receive configurations

  • branch (dict[str, Branch]) – branch upstreams configurations

  • auth (Auth) – authentication configurations

  • pack (Pack) – packfile configurations

Method generated by attrs for class Config.