Skip to main content

Enforce a triangular Git workflow. If this is not possible, explain why.

Project description

Samosa (समोसा)

Enforce a triangular Git workflow. If this is not possible, explain why.

Samosa standard

The following checks should be true:

  • In a Git repository
  • There is a remote named "origin"
  • There is a remote named "upstream"
  • Author name and email are set, and are not invalid
  • The default push target is "origin:current"
  • The pre-commit hook exists and is executable
  • There is a local branch named "main"
  • The main branch tracks "upstream/main"

See WORKFLOW.md for a detailed workflow that results in a samosa standard repository.

Usage

cd <repository-folder>
samosa

If any checks fail, Samosa will attempt to make a correction. If the correction cannot be made automatically, Samosa will make a suggestion and terminate with exit code 1 (error).

If all checks pass, Samosa will display a short confirmation message and terminate with exit code 0 (success).

Development environment

First, fork https://gitlab.com/lofidevops/samosa

git checkout <your-fork>
cd samosa
# set up triangular workflow here!
pdm install --dev

You can use a text editor, or any IDE that supports virtualenv / pdm.

Roadmap (don't hold your breath)

  • samosa clone: interactive prompts that follow the suggested workflow
  • samosa checkout: in samosa repository, checkout a new branch, hooked up correctly

Out of scope

  • Detecting/supporting other workflows.

Sharing and contributions

Samosa (समोसा)
https://gitlab.com/lofidevops/samosa
Copyright 2022 David Seaward and contributors
SPDX-License-Identifier: GPL-3.0-or-later

Shared under GPL-3.0-or-later. We adhere to the Contributor Covenant 2.0 without modification, and certify origin per DCO 1.1 with a signed-off-by line. Contributions under the same terms are welcome.

Submit conduct issues as private tickets. Sign commits with git -s. For a software bill of materials run reuse spdx. For more details see LICENSES, CONDUCT and DCO.

Acknowledgements

WORKFLOW.md and the associated pre-commit bash script are derived from Aaron Bull Schaefer's excellent Git Triangular Workflow. License details are included in the relevant files.

Additional references

Project details


Download files

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

Source Distribution

samosa-0.1.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

samosa-0.1.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file samosa-0.1.3.tar.gz.

File metadata

  • Download URL: samosa-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.1.3 CPython/3.10.4

File hashes

Hashes for samosa-0.1.3.tar.gz
Algorithm Hash digest
SHA256 804562a916b40fcaef175955b4885ddf39237e433ee67b652c5dca427904760d
MD5 7d6118e0954d14cbbc6ca774b162c0dc
BLAKE2b-256 3fbc02f708588fbe6c65304838477ef1415740be775f31858c41b6ec715fe016

See more details on using hashes here.

File details

Details for the file samosa-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: samosa-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.1.3 CPython/3.10.4

File hashes

Hashes for samosa-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 abf51ba2f6071835318117234cec5e5a8238ba7a700e3ffedec27fbb53debf69
MD5 41d0d0973537383949a11f831138c1b8
BLAKE2b-256 dba9ccdc07006fadaec1a8cab4ebf933bb48b673caf9b15c31e6ce2d74410866

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page