{"id":22423328,"url":"https://github.com/prantlf/v-github","last_synced_at":"2025-03-27T05:40:37.594Z","repository":{"id":213000539,"uuid":"732790393","full_name":"prantlf/v-github","owner":"prantlf","description":"Several functions for managing GitHub projects.","archived":false,"fork":false,"pushed_at":"2024-11-16T04:08:08.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T10:42:52.481Z","etag":null,"topics":["github","v","vlang"],"latest_commit_sha":null,"homepage":"","language":"V","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/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-12-17T20:41:02.000Z","updated_at":"2024-11-16T04:08:12.000Z","dependencies_parsed_at":"2024-02-12T05:33:48.454Z","dependency_job_id":"9c9605a2-c29c-4856-a315-afc3d713496e","html_url":"https://github.com/prantlf/v-github","commit_stats":null,"previous_names":["prantlf/v-github"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fv-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fv-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fv-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fv-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/v-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791898,"owners_count":20672667,"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":["github","v","vlang"],"created_at":"2024-12-05T18:10:02.454Z","updated_at":"2025-03-27T05:40:37.574Z","avatar_url":"https://github.com/prantlf.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Project Library for V\n\nSeveral functions for managing GitHub projects.\n\n## Synopsis\n\n```v\nimport prantlf.github { find_git, get_repo_path }\nimport prantlf.json { parse }\n\n// Get repository path, for example: 'prantlf/v-github'\ngit_path := find_git()!\nrepo_path := get_repo_path(git_path)!\n\n// Get authorisation token from environment variables GITHUB_TOKEN or GH_TOKEN\ngh_token := get_gh_token()!\n\n// Get tag of the latest release\noutput := get_latest_release(repo_path, gh_token)!\nrelease := parse(output)!.object()!\ntag := release['tag_name']!.string()!\n```\n\n## Installation\n\nYou can install this package either from [VPM] or from GitHub:\n\n```txt\nv install prantlf.github\nv install --git https://github.com/prantlf/v-github\n```\n\n## API\n\nThe following functions are exported:\n\n    find_git() !string\n    get_repo_url(git_dir string) !string\n    cut_repo_path(repo_url string) !string\n    get_repo_path(git_dir string) !string\n    is_github(repo_url string) bool\n    is_gitlab(repo_url string) bool\n    get_gh_token() !string\n\n    get_release(repo string, token string, tag string) !string\n    get_latest_release(repo string, token string) !string\n    create_release(repo string, token string, tag string, ver string, log string) !string\n    download_asset(url string, token string) !string\n    upload_asset(repo string, token string, id int, name string, data string, typ string) !string\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.\n\n## License\n\nCopyright (c) 2023-2024 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[VPM]: https://vpm.vlang.io/packages/prantlf.github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fv-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fv-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fv-github/lists"}