Better merge behavior for git-gate repos #237

Closed
opened 2026-06-19 21:53:09 -04:00 by didericis · 0 comments
Owner

When I extend bottles with two git-gate repos of the same name, the latter one completely overwrites the former, making it harder/less useful to extend repo configuration. The git-gate configuration should be merged instead.

bot-bottle-dev

git-gate:
  repos:
    bot-bottle:
      url: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git
      host_key: "..."
      key:
        provider: static
        path: ~/.ssh/gitea-delos-2.pem

egress:
  log: 2
  routes:
    - host: pypi.org
      dlp:
        inbound_detectors: false
    - host: files.pythonhosted.org
      dlp:
        inbound_detectors: false

bot-bottle-provisioned

extends: bot-bottle-dev

git-gate:
  repos:
    bot-bottle:
      key:
        provider: gitea
        forge_token_env: GITEA_ADMIN_TOKEN

Final config should look like this:

git-gate:
  repos:
    bot-bottle:
      url: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git
      host_key: "..."
      key:
        provider: gitea
        forge_token_env: GITEA_ADMIN_TOKEN

egress:
  log: 2
  routes:
    - host: pypi.org
      dlp:
        inbound_detectors: false
    - host: files.pythonhosted.org
      dlp:
        inbound_detectors: false
When I extend bottles with two git-gate repos of the same name, the latter one completely overwrites the former, making it harder/less useful to extend repo configuration. The git-gate configuration should be merged instead. `bot-bottle-dev` ```yaml git-gate: repos: bot-bottle: url: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git host_key: "..." key: provider: static path: ~/.ssh/gitea-delos-2.pem egress: log: 2 routes: - host: pypi.org dlp: inbound_detectors: false - host: files.pythonhosted.org dlp: inbound_detectors: false ``` `bot-bottle-provisioned` ```yaml extends: bot-bottle-dev git-gate: repos: bot-bottle: key: provider: gitea forge_token_env: GITEA_ADMIN_TOKEN ``` Final config should look like this: ```yaml git-gate: repos: bot-bottle: url: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git host_key: "..." key: provider: gitea forge_token_env: GITEA_ADMIN_TOKEN egress: log: 2 routes: - host: pypi.org dlp: inbound_detectors: false - host: files.pythonhosted.org dlp: inbound_detectors: false ```
didericis added the Kind/Enhancement label 2026-06-19 21:53:32 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#237