{"id":21905052,"url":"https://github.com/kenjyco/easy-workflow-manager","last_synced_at":"2026-05-19T19:04:21.249Z","repository":{"id":54612117,"uuid":"161144688","full_name":"kenjyco/easy-workflow-manager","owner":"kenjyco","description":"Tools to support a straightforward branch/qa/merge/release process","archived":false,"fork":false,"pushed_at":"2024-11-30T16:57:55.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T04:08:30.449Z","etag":null,"topics":["cli","git","kenjyco","python","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenjyco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-10T08:47:31.000Z","updated_at":"2024-11-30T16:57:58.000Z","dependencies_parsed_at":"2025-07-01T04:08:32.449Z","dependency_job_id":"f78bde47-f4ce-4cb7-a88a-ffd2e2e74aeb","html_url":"https://github.com/kenjyco/easy-workflow-manager","commit_stats":{"total_commits":87,"total_committers":1,"mean_commits":87.0,"dds":0.0,"last_synced_commit":"dc80abde56876d2db6fda7b8985f0d7e0a461e2f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/kenjyco/easy-workflow-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Feasy-workflow-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Feasy-workflow-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Feasy-workflow-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Feasy-workflow-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenjyco","download_url":"https://codeload.github.com/kenjyco/easy-workflow-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjyco%2Feasy-workflow-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265688326,"owners_count":23811416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","kenjyco","python","workflow"],"created_at":"2024-11-28T16:28:08.628Z","updated_at":"2026-05-19T19:04:21.210Z","avatar_url":"https://github.com/kenjyco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Install\n\nInstall with `pip`\n\n```\n% pip3 install easy-workflow-manager\n```\n\nAfter running for the first time, the default settings file is copied to\n`~/.config/easy-workflow-manager/settings.ini`\n\n```\n[default]\nQA_BRANCHES = qa, qa2, qa3, qa4\nIGNORE_BRANCHES = master, develop, release, uat\nLOCAL_BRANCH = mylocalprep\nSOURCE_BRANCH = master\n```\n\n## Understanding\n\nTo understand how you might make use of this project, check out some of the test\nhelper functions and test code, then the scripts\n\n- `tests/__init__.py` overrwites some settings for `QA_BRANCHES` and\n  `SOURCE_BRANCH` and defines several functions that execute `git` commands,\n  with the help of `bg_helper.run`\n    - `make_file` to create a file using `echo` and output redirection\n    - `append_to_file` to append to a file using `echo` and output redirection\n    - `change_file_line` to change a line of a file using `sed`\n    - `init_clone_cd_repo` to create a git repo at `remote_path`, clone it to\n      `local_path`, and cd to `local_path`\n        - also creates a file, commits it, and pushes to origin\n    - `checkout_branch` to checkout an existing branch\n    - `add_commit_push` to add modified files, commit, and push\n    - `deploy_merge_tag` to deploy a branch to an open qa environment, merge back\n      to source, then tag\n        - this makes heavy use of some high-level `easy_workflow_manager` functions\n            - `get_empty_qa`\n            - `get_remote_branches`\n            - `deploy_to_qa`\n            - `get_qa_env_branches`\n            - `merge_qa_to_source`\n            - `tag_release`\n            - `get_tag_message`\n- `tests/conftest.py` defines a single \"fixture\" that creates a new folder in\n  `/tmp` to contain a new \"remote git repository\" and its \"local clone\" per\n  defined test class\n    - the fixture yields to let the methods of the test class run before\n      deleting the temporary data\n        - this would be a good place to drop a `pytest.set_trace()` if you want\n          to inspect temporary repos and their commits\n- `tests/test_stuff.py` defines two test classes with some test methods\n    - `TestNewRepo.test_remote_branches` to make sure the only remote branch is\n      `master`, create 3 new branches, confirm that various invocations of\n      `ewm.get_remote_branches()` return what you'd expect\n    - `TestNewRepo.test_local_branches` to confirm that various invocations of\n      `ewm.get_local_branches()` return what you'd expect\n    - `TestNewRepo.test_qa` to confirm that no qa branches are in use and that\n      `ewm.get_empty_qa()` returns the set of the overwritten `QA_BRANCHES`,\n      then use the helper functions to append to a file, commit the changes,\n      push to the remote\n        - then check that `ewm.deploy_to_qa()` gets the specified branch(es)\n          onto the specified qa branch\n        - then check that `ewm.clear_qa()` clears the specified qa branch\n    - `TestNewRepo.test_change_commit_push()` to update a file\n        - then check that `ewm.get_merged_remote_branches()` does not include\n          the branch that was just updated\n    - `TestNewRepo.test_tagging()` to check that merging a branch to source and\n      tagging it works\n\n## Commands / scripts\n\n```\n$ venv/bin/ewm-new-branch-from-source --help\nUsage: ewm-new-branch-from-source [OPTIONS] [NAME]\n\n  Create a new branch from SOURCE_BRANCH on origin\n\nOptions:\n  --help  Show this message and exit.\n\n\n$ venv/bin/ewm-deploy-to-qa --help\nUsage: ewm-deploy-to-qa [OPTIONS] [QA]\n\n  Select remote branch(es) to deploy to specified QA branch\n\nOptions:\n  -g, --grep TEXT  case-insensitive grep pattern to filter branch names by\n  --help           Show this message and exit.\n\n\n$ venv/bin/ewm-qa-to-source --help\nUsage: ewm-qa-to-source [OPTIONS] [QA]\n\n  Merge the QA-verified code to SOURCE_BRANCH and delete merged branch(es)\n\nOptions:\n  --help  Show this message and exit.\n\n\n$ venv/bin/ewm-show-qa --help\nUsage: ewm-show-qa [OPTIONS] [QA]\n\n  Show what is in a specific (or all) qa branch(es)\n\nOptions:\n  -a, --all  Select all qa environments\n  --help     Show this message and exit.\n\n\n$ venv/bin/ewm-clear-qa --help\nUsage: ewm-clear-qa [OPTIONS] [QA]\n\n  Clear whatever is in a specific (or all) qa branch(es)\n\nOptions:\n  -a, --all  Select all qa environments\n  --help     Show this message and exit.\n\n\n$ venv/bin/ewm-tag-release --help\nUsage: ewm-tag-release [OPTIONS]\n\n  Select a recent remote commit on SOURCE_BRANCH to tag\n\nOptions:\n  --help  Show this message and exit.\n```\n\n## Running Tests\n\nClone this repo then run the `./dev-setup.bash` script to create a virtual\nenvironment that includes `pytest`\n\n```\n% ./dev-setup.bash\n```\n\nRun pytest with the `-v` an `-s` options to tests invoked as well as all the\ngenerated `git` commands and their output\n\n```\n% venv/bin/pytest -vs\n```\n\n## Resources\n\n- \u003chttps://git-scm.com/book/en/v2\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Feasy-workflow-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenjyco%2Feasy-workflow-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjyco%2Feasy-workflow-manager/lists"}