{"id":17005887,"url":"https://github.com/devatherock/utilities","last_synced_at":"2025-07-31T09:37:25.877Z","repository":{"id":43091827,"uuid":"244183434","full_name":"devatherock/utilities","owner":"devatherock","description":"Utility scripts to perform common, repetitive tasks","archived":false,"fork":false,"pushed_at":"2024-12-18T10:31:28.000Z","size":205,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T06:52:09.412Z","etag":null,"topics":["consumer","google","groovy","kafka","repetitive-tasks"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devatherock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2020-03-01T16:27:57.000Z","updated_at":"2024-12-18T10:31:43.000Z","dependencies_parsed_at":"2023-11-21T05:33:13.245Z","dependency_job_id":"cfe7c2f5-ee78-47c1-9609-e0a3dac5287a","html_url":"https://github.com/devatherock/utilities","commit_stats":{"total_commits":65,"total_committers":3,"mean_commits":"21.666666666666668","dds":0.2153846153846154,"last_synced_commit":"3e6f0c2de0520e72a20d36857a21ecfaf2177e5a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devatherock/utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Futilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Futilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Futilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Futilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devatherock","download_url":"https://codeload.github.com/devatherock/utilities/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatherock%2Futilities/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268017357,"owners_count":24181669,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["consumer","google","groovy","kafka","repetitive-tasks"],"created_at":"2024-10-14T05:04:24.853Z","updated_at":"2025-07-31T09:37:25.856Z","avatar_url":"https://github.com/devatherock.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# utilities\nUtility scripts to perform common, repetitive tasks\n\n## Google\n### GoogleAccessToken.groovy\n- To generate an access token for Firebase cloud messaging\n\n```\ngroovy GoogleAccessToken.groovy -c \"path/to/service-accounts.json\" -s \"https://www.googleapis.com/auth/firebase.messaging\"\n```\n\n\n## Github\nWhen using these scripts with github enterprise, an API URL including the `/api/v3` path would need to be supplied\n\n### AddLabelToIssues.groovy\nAdds a supplied label to issues with a specific string in title\n\n- To use with a repo in an org\n```shell\ngroovy github/AddLabelToIssues.groovy -t \u003cGIT_TOKEN\u003e -n \u003cusername\u003e -o \u003corg\u003e -r \u003crepo-name\u003e \\\n  -s \u003csearch-string\u003e -l \u003clabel\u003e\n```\n\n- To use with a repo under a username\n```shell\ngroovy github/AddLabelToIssues.groovy -t \u003cGIT_TOKEN\u003e -n \u003cusername\u003e -r \u003crepo-name\u003e -s \u003csearch-string\u003e -l \u003clabel\u003e\n```\n\n### CloseIssues.groovy\nCloses issues that have a specific label\n\n- To use with a repo in an org\n```shell\ngroovy github/CloseIssues.groovy -t \u003cGIT_TOKEN\u003e -n \u003cusername\u003e -o \u003corg\u003e -r \u003crepo-name\u003e -l \u003clabel\u003e\n```\n\n- To use with a repo under a username\n```shell\ngroovy github/CloseIssues.groovy -t \u003cGIT_TOKEN\u003e -n \u003cusername\u003e -r \u003crepo-name\u003e -l \u003clabel\u003e\n```\n\n### CreateTag.groovy\nCreates a git tag with commit comments as message and pushes to remote. Needs to be executed with the git repo as the working directory\n\n**Sample:**\n\n```shell\ngroovy /absolute/path/to/utilities/scripts/Groovy/github/CreateTag.groovy\n```\n\n**Parameters:**\n\n```\n    --help           Displays script usage instructions\n -nd,--not-dry-run   Flag to test changes without committing to git\n```\n\n## Other scripts\n### Base64.groovy\n- To encode a string\n```\ngroovy Base64.groovy -i hello\n```\n\n- To encode contents of a file\n```\ngroovy Base64.groovy -f /path/to/file\n```\n\n- To decode a string\n```\ngroovy Base64.groovy -D -i aGVsbG8=\n```\n\n### Deduplicater.groovy\n```\ngroovy file/Deduplicater.groovy -i /path/to/input/file -o /path/to/output/file\n```\n\n### CsvQuery.groovy\nQueries a CSV file and outputs the results to console or to a file\n\n**Sample:**\n\n```\ngroovy CsvQuery.groovy -i /path/to/input.csv -q /path/to/query.yml -o /path/to/output.csv\n```\n\n**Parameters:**\n\n```\n -i,--input \u003cinput\u003e       Input CSV file\n -o,--output \u003coutput\u003e     Output CSV file\n -q,--query \u003cquery\u003e       Yaml file containing the query\n -t,--threads \u003cthreads\u003e   Number of threads to use for processing\n```\n\n**query.yml sample:**\n\n```yaml\nselect:\n  - full_name\n  - birthday\n  - age\n  - country\nreductions:\n  - distinct\ntransformations:\n  - name: concat\n    fields:\n      - full_name\n    parameters:\n      right: ';'\n  - name: convert_date\n    fields:\n      - birthday\n    parameters:\n      input_format: MM/dd/yyyy\n      output_format: yyyy-MM-dd\nwhere:\n  operator: and\n  filters:\n    - operator: or\n      filters:\n        - field: first_name\n          condition: in\n          values:\n            - John\n            - Jack\n        - field: last_name\n          condition: in\n          values:\n            - Smith\n    - field: last_name\n      condition: nin\n      values:\n        - Snow\n    - field: country\n      condition: like\n      values:\n        - ^Canada$|^Mexico$\n```\n\n### BackupCreator.groovy\nBacks up specific files/folders within a source folder into a target folder. Files/folders to be backed up need to be specified in a config file\n\n**Sample:**\n\n```\ngroovy BackupCreator.groovy -s /path/to/source -t /path/to/target -c backup-config.yml\n```\n\n**Parameters:**\n\n```\n -c,--config \u003cconfig\u003e             File containing the config to use for the backup\n -l,--log-level \u003clog-level\u003e       Log level to use. Defaults to INFO\n -s,--source-path \u003csource-path\u003e   Path from which to backup the files\n -t,--target-path \u003ctarget-path\u003e   Path to which to backup the files\n```\n\n**Config file sample:**\n\n```yaml\ninclusions:\n  - .gradle/gradle.properties\n  - .circleci/cli.yml\n  - .docker/config.json\n  - .jenkins/init.groovy.d\n  - .jenkins/secrets\n  - .kube/config\n  - .minikube/ca.crt\n  - .minikube/certs\n  - .minikube/config\n  - .minikube/machines\n  - .minikube/profiles\n  - .ssh\n  - .gitconfig\n  - .bashrc\n  - .bash_history\n  - .dbshell\n  - .netrc\n  - .zshrc\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatherock%2Futilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevatherock%2Futilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatherock%2Futilities/lists"}