{"id":26753755,"url":"https://github.com/freekds/cian","last_synced_at":"2026-04-15T11:37:56.704Z","repository":{"id":40484343,"uuid":"413726565","full_name":"FreekDS/CIAN","owner":"FreekDS","description":"Continuous Integration Antipattern aNalyzer: a command line tool to analyze CI workflows in git repositories","archived":false,"fork":false,"pushed_at":"2022-10-02T14:53:18.000Z","size":16911,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-03-10T06:02:24.521Z","etag":null,"topics":["analysis","ci","git","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreekDS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-05T08:03:06.000Z","updated_at":"2022-08-15T11:15:57.000Z","dependencies_parsed_at":"2023-01-19T02:01:25.182Z","dependency_job_id":null,"html_url":"https://github.com/FreekDS/CIAN","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreekDS%2FCIAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreekDS%2FCIAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreekDS%2FCIAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreekDS%2FCIAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreekDS","download_url":"https://codeload.github.com/FreekDS/CIAN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246037850,"owners_count":20713480,"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":["analysis","ci","git","python"],"created_at":"2025-03-28T13:34:19.434Z","updated_at":"2026-04-15T11:37:51.665Z","avatar_url":"https://github.com/FreekDS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CIAN\n[![Git Analyzer CI](https://github.com/FreekDS/git-ci-analyzer/actions/workflows/ci-main.yml/badge.svg)](https://github.com/FreekDS/git-ci-analyzer/actions/workflows/ci-main.yml) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/FreekDS/CIAN/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/FreekDS/CIAN/tree/main)\n\u003e Continuous Integration Antipattern aNalyzer: a command line tool to analyze CI workflows in git repositories written in Python 3.10.\n\n---\n\nThe goal for this project is to create a command line tool that is capable of analyzing CI implementations in Git repositories.\nThe focus of the analysis is on CI antipatterns.\nThe tool is capable of analyzing TravisCI builds and GitHub Actions builds.\n\nOutput is generated in the form of graphs and a JSON file containing the information.\n\n## Installation\nIn order to install this tool, you have to follow the next steps\n1. Clone this repository to your local machine \u003cbr\u003e\n   ```shell\n   git clone https://github.com/FreekDS/git-ci-analyzer.git\n    ```\n2. Go to the cloned directory\n    ```shell\n   cd git-ci-analyzer/\n   ```\n3. Install the required dependencies\n    ```shell\n   pip install -r requirements.txt\n   ```\n\n### Requirements\nIn order to be able to install everything, make sure the following is installed on your machine\n1. Python 3.10 (this is the Python version where the tool is written in, it might also work with lower Python versions)\n2. pip\n3. To access private repositories, and to have a higher rate limit, the following environment variables should be set\n   \u003e GH_TOKEN_COUNT=2 \u003cbr\u003e\n   \u003e GH_TOKEN_1=\u003cyour_1st_github_token\u003e \u003cbr\u003e\n   \u003e GH_TOKEN_2=\u003cyour_2nd_github_token\u003e \u003cbr\u003e\n   \u003e CIRCLE_CI=\u003cyour_circleci_token\u003e \u003cbr\u003e\n   \u003e TRAVIS_CI=\u003cyour_travis_token\u003e\n   \n   They can be set by creating a ```.env``` file. This file is loaded automatically.\u003cbr\u003e\n   It is advised to set at least one `GH_TOKEN` as this increases the rate limit for the GitHub API significantly.\n   Any number of GitHub token can be set by increasing the value of `GH_TOKEN_COUNT` and by adding the appropriate tokens\n   using the format `GH_TOKEN_#`.\n\n## Usage\nTo view the usage of the tool, run\n````shell\npython gitci.py -h\n````\n\nThere is only one required argument: the repository slugs.\nA slug describes the repository you want to analyze.\nIt is formatted as follows\n\u003e [{provider}/]{username}/{repository_name}\n\nThe provider argument in this slug is optional. By default, the default provider is used (GitHub, see option `-p`)\nFor example, the slugs that point to this repository are the following\n\n\u003e FreekDS/git-ci-analyzer \u003cbr\u003e\n\u003e gh/FreekDS/git-ci-analyzer \u003cbr\u003e\n\u003e github/FreekDS/git-ci-analyzer \u003cbr\u003e\n\nMultiple slugs can be passed in at once. The slugs should be separated by a space.\n\nInformation of the other command line options are provided by using ```-h``` or ``--help``\n`````\nusage: gitci.py [-h] [-p DEFAULT_PROVIDER] [-do]\n                [-a ANTI_PATTERNS [ANTI_PATTERNS ...]] [-nc] [-ncc]\n                [-od OUT_DIR] [-v] [-d START_DATE]\n                repository_slugs [repository_slugs ...]\n\npositional arguments:\n  repository_slugs      One or more repository slugs. A slug is constructed as\n                        follows:[{provider}/]{username}/{repository_name}The\n                        provider is optional. If none is given, the default\n                        provider is assumed (see -p)\n\noptions:\n  -h, --help            show this help message and exit\n  -p DEFAULT_PROVIDER, --default-provider DEFAULT_PROVIDER\n                        Default provider. Allowed values are ['github', 'gh']\n  -do, --detect-only    Only detect CI tools in the specified repositories\n  -a ANTI_PATTERNS [ANTI_PATTERNS ...], --anti-patterns ANTI_PATTERNS [ANTI_PATTERNS ...]\n                        Select anti-patterns to detect, allowed values are\n                        ['slow_build', 'broken_release', 'late_merging',\n                        'skip_failing_tests']\n  -nc, --no-cache       Use this flag to disable cache usage\n  -ncc, --no-create-cache\n                        Use this flag to disable cache creation\n  -od OUT_DIR, --out-dir OUT_DIR\n                        Output path\n  -v, --verbose         Provide more information in console\n  -d START_DATE, --start-date START_DATE\n                        Date to start collecting data from, if none is\n                        provided, the latest three months are collected. Date\n                        should be formatted as YYYY-MM-DD\n`````\n\n\n### Examples\n\n`````shell\npython gitci.py FreekDS/git-ci-analyzer\npython gitci.py gh/FreekDS/git-ci-analyzer godotengine/godot\npython gitci.py FreekDS/git-ci-analyzer -p github\npython gitci.py godotengine/godot -od C:/user/path/ -nc -ncc\npython gitci.py FreekDS/git-ci-analyzer -v -a slow_build broken_release -nc\n`````\n\n## Features\nAt the moment, the following features are present:\n1. Detect which CI tools are implemented in a repository.\n2. Analyze builds to gather information on antipatterns\n   1. Slow build\n   2. Broken release branch\n   3. Late merging\n   4. Skip failing tests\n3. Output to JSON, graphs and text\n\n\n## Tests\nTests are located in the `tests/` folder.\nThey are pytest based and can be executed with\n````shell\npytest .\n````\n\n## Note About Caching\nIf the tool is executed multiple times on the same repository, it uses the generated cache files by default since\ncollecting data from the GitHub or Travis API is a costly operation.\nIf you wish not to use the cache, the option ```-nc``` (no cache) should be used.\nDo note that as long as the `````-ncc````` (no create cache) option is not present, the cache files will be overwritten.\n\nCache files are located under the ```cache/``` directory and can be deleted manually.\n\n## Example Output\nRepository: [pytest-dev/pytest](https://www.github.com/pytest-dev/pytest)\n\n![Broken Release](./doc/broken_release.png)\n![Slow Build](./doc/slow_build.png)\n## License\n\nThis repository is MIT licensed.\nSee the [LICENSE](./LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreekds%2Fcian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreekds%2Fcian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreekds%2Fcian/lists"}