{"id":20761269,"url":"https://github.com/philips-labs/tabia","last_synced_at":"2025-04-30T06:07:41.328Z","repository":{"id":36973484,"uuid":"265306375","full_name":"philips-labs/tabia","owner":"philips-labs","description":"Repository characteristics ","archived":false,"fork":false,"pushed_at":"2025-04-21T06:54:39.000Z","size":738,"stargazers_count":12,"open_issues_count":15,"forks_count":7,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-30T06:07:33.787Z","etag":null,"topics":["bitbucket","bitbucket-cli","chaoss","cli","git","github","github-cli","github-graphql-apiv4","gitlab","gitlab-api","gitlab-cli","grimoirelab","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Go","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/philips-labs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-19T16:50:46.000Z","updated_at":"2025-04-08T08:17:48.000Z","dependencies_parsed_at":"2023-11-29T15:50:18.075Z","dependency_job_id":"a1047f59-21fc-4577-9555-cdece28999f2","html_url":"https://github.com/philips-labs/tabia","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-labs%2Ftabia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-labs%2Ftabia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-labs%2Ftabia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-labs%2Ftabia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips-labs","download_url":"https://codeload.github.com/philips-labs/tabia/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651233,"owners_count":21621716,"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":["bitbucket","bitbucket-cli","chaoss","cli","git","github","github-cli","github-graphql-apiv4","gitlab","gitlab-api","gitlab-cli","grimoirelab","hacktoberfest"],"created_at":"2024-11-17T10:18:40.068Z","updated_at":"2025-04-30T06:07:41.310Z","avatar_url":"https://github.com/philips-labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tabia\n\n[![Go CI](https://github.com/philips-labs/tabia/workflows/Go%20CI/badge.svg)](https://github.com/philips-labs/tabia/actions)\n[![codecov](https://codecov.io/gh/philips-labs/tabia/branch/develop/graph/badge.svg?token=K2R9WOXNBm)](https://codecov.io/gh/philips-labs/tabia)\n\nTabia means characteristic in Swahili. Tabia is giving us insights on the characteristics of our code bases.\n\n## Setup\n\nCopy `.env.example` to `.env` and fill out the bitbucket token. This environment variable is read by the CLI and tests. Also vscode will read the variable when running tests or starting debugger.\n\n```bash\ncp .env.example .env\nsource .env\nenv | grep TABIA\n```\n\nInstall required tools:\n\n```bash\nmake install-tools\n```\n\nAdd your $GO_PATH/bin folder to your path to make the installed Go tools globally available.\n\n```bash\nexport GO_PATH=\"$HOME/go\"\nexport PATH=\"$GO_PATH/bin:$PATH\"\n```\n\n## Build\n\nTo build the CLI you can make use of the `build` target using `make`.\n\n```bash\nmake build\n```\n\n## Test\n\nTo run tests you can make use of the `test` target using `make`.\n\n```bash\nmake test\n```\n\n## Run\n\n### Bitbucket\n\nTo interact with Bitbucket `tabia` makes use of the [Bitbucket 1.0 Rest API](https://docs.atlassian.com/bitbucket-server/rest/7.3.0/bitbucket-rest.html).\n\n```bash\nbin/tabia bitbucket --help\nbin/tabia bitbucket projects --help\nbin/tabia bitbucket repositories --help\n```\n\n### Github\n\nTo interact with Github `tabia` makes use of the [Github graphql API](https://api.github.com/graphql).\n\n```bash\nbin/tabia github --help\nbin/tabia github repositories --help\n```\n\n### Output - Grimoirelab\n\nTo expose the repositories in [Grimoirelab projects.json](https://github.com/chaoss/grimoirelab-sirmordred#projectsjson-) format, you can optionally provide a json file to map repositories to projects. By default the project will be mapped to the owner of the repository. Anything not matching the rules will fall back to this default.\n\nE.g.:\n\n```bash\nbin/tabia -O philips-labs -M github-projects.json -F grimoirelab \u003e projects.json\n```\n\nRegexes should be defined in the [following format](https://golang.org/pkg/regexp/syntax/).\n\n```json\n{\n  \"rules\": {\n    \"One Codebase\": { \"url\": \"tabia|varys|garo|^code\\\\-chars$\" },\n    \"HSDP\": { \"url\": \"(?i)hsdp\" },\n    \"iX\": { \"url\": \"(?i)ix\\\\-\" },\n    \"Licensing Entitlement\": { \"url\": \"(?i)lem\\\\-\" },\n    \"Code Signing\": { \"url\": \"(?i)^code\\\\-signing$|notary\" }\n  }\n}\n```\n\n#### Output - using template\n\nTo generate the output for example in a markdown format you can use the option for a templated output format. This requires you to provide the path to a template file as well. Templates can be defined using the following [template/text package syntax](https://golang.org/pkg/text/template/).\n\nE.g.:\n\n```md markdown.tmpl\n# Our repositories\n\nOur repository overview. Private/Internal repositories are marked with a __*__\n\n{{range .}}* [{{ .Name}}]({{ .URL }}) {{if .IsPrivate() }}__*__{{end}}\n{{end}}\n```\n\nUsing above template we can now easily generate a markdown file with this unordered list of repository links.\n\n```bash\nbin/tabia -O philips-labs -F templated -T markdown.tmpl \u003e repositories.md\n```\n\n#### Filter\n\n##### Repositories\n\nThe following repository fields can be filtered on.\n\n* ID\n* Name\n* Description\n* URL\n* SSHURL\n* Owner\n* Visibility\n* CreatedAt\n* UpdatedAt\n* PushedAt\n* Topics\n\nThe following functions are available.\n\n* `func (RepositoryFilterEnv) Contains(s, substr string) bool`\n* `func (Repository) IsPublic() bool`\n* `func (Repository) IsInternal() bool`\n* `func (Repository) IsPrivate() bool`\n* `func (Repository) HasTopic(topic string) bool`\n* `func (Repository) CreatedSince(date string) bool`\n* `func (Repository) UpdatedSince(date string) bool`\n* `func (Repository) PushedSince(date string) bool`\n\n```bash\n$ bin/tabia github repositories -O philips-labs -f '{ !.IsPrivate() \u0026\u0026 !.IsInternal() \u0026\u0026 !Contains(.Name, \"terraform\") }'\n      Name                                  Owner         Visibility  Clone\n0001  helm2cf                               philips-labs  Public      https://github.com/philips-labs/helm2cf\n0002  dct-notary-admin                      philips-labs  Public      https://github.com/philips-labs/dct-notary-admin\n0003  notary                                philips-labs  Public      https://github.com/philips-labs/notary\n0004  about-this-organization               philips-labs  Public      https://github.com/philips-labs/about-this-organization\n0005  sonar-scanner-action                  philips-labs  Public      https://github.com/philips-labs/sonar-scanner-action\n0006  medical-delivery-drone                philips-labs  Public      https://github.com/philips-labs/medical-delivery-drone\n0007  dangerous-dave                        philips-labs  Public      https://github.com/philips-labs/dangerous-dave\n0008  varys                                 philips-labs  Public      https://github.com/philips-labs/varys\n0009  garo                                  philips-labs  Public      https://github.com/philips-labs/garo\n..........\n...........\n........\n```\n\n##### Members\n\nThe following member fields can be filtered on.\n\n* ID\n* Login\n* Name\n* Organization\n* SamlIdentity\n  * ID\n\nThe following functions are available.\n\n* `func (MemberFilterEnv) Contains(s, substr string) bool`\n\n#### Download contents\n\n```bash\nbin/tabia github contents --repo philips-labs/tabia --file README.md --output downloads/tabia/README.md\n$ cat downloads/tabia/README.md\n# Tabia\n\n[![Go CI](https://github.com/philips-labs/tabia/workflows/Go%20CI/badge.svg)](https://github.com/philips-labs/tabia/actions)\n[![codecov](https://codecov.io/gh/philips-labs/tabia/branch/develop/graph/badge.svg?token=K2R9WOXNBm)](https://codecov.io/gh/philips-labs/tabia)\n...\n...\n..\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-labs%2Ftabia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips-labs%2Ftabia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-labs%2Ftabia/lists"}