Skip to main content

Run command when the upstream git branch was updated.

Example work file named git-monitor.yaml:

  • path: ~/work/company-website-dev
    command: ansible-playbook playbook-develop-company.yml
  • path: ~/work/company-website-prod
    remote: origin
    branch: production
    force: 1
    commands:
    - ansible-playbook playbook-deploy-company.yml

The first item ignores the default values, which are remote=origin, branch=main, force=0. If you didn’t set command, gitmon will only update the repository.

In the next example we have three additional fields:

  • path: ~/work/company-website-prod
    remote: origin
    branch: main
    force: 1
    repo_url: git://git@github.com/username/company-website
    ssh_keyfile: ~/.ssh/company-key
    ssh_keyfile_password: company-password

If the path is empty, we will try to create a new clone. And if the url scheme is not http, we will assume it was ssh, and if ssh_keyfile is set we will use that when cloning or updating the path.

Usage

Example:

python3 -m gitmon git-monitor.yaml

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygitmon-0.0.1.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygitmon-0.0.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file pygitmon-0.0.1.tar.gz.

File metadata

  • Download URL: pygitmon-0.0.1.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pygitmon-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2ec736da34784601de06f54fa3cd44e612de04514f67743a2e02ba6b91ded43a
MD5 6fd8fd42af032540e9fedb7bceb5f2c7
BLAKE2b-256 b74b0b283207d6e51d198df7db56814cea62548473dcd0089a2a18973ad9876f

See more details on using hashes here.

File details

Details for the file pygitmon-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pygitmon-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pygitmon-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0fb96772e7f86f0d62e9d8295c5eb92cc5579e0cb3037d34299c0b39fb119de
MD5 2cb785190d6094a74de17ae9989c11b1
BLAKE2b-256 315bf792b6e25ccad3c3d1aca59edc17b6e69f9de89c8ad329284bd6158d46fc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.2

2 files

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page