{"id":15532500,"url":"https://github.com/mtharrison/github-pr-comment-resource","last_synced_at":"2025-03-28T22:26:56.970Z","repository":{"id":64302263,"uuid":"277111369","full_name":"mtharrison/github-pr-comment-resource","owner":"mtharrison","description":"A Concourse Resource for Github PR comments ✈️","archived":false,"fork":false,"pushed_at":"2020-07-10T09:44:59.000Z","size":4035,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T08:51:10.768Z","etag":null,"topics":["automation","ci","concourse","golang"],"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/mtharrison.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":"2020-07-04T13:05:32.000Z","updated_at":"2021-07-21T14:26:45.000Z","dependencies_parsed_at":"2022-12-06T07:45:44.493Z","dependency_job_id":null,"html_url":"https://github.com/mtharrison/github-pr-comment-resource","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtharrison%2Fgithub-pr-comment-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtharrison%2Fgithub-pr-comment-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtharrison%2Fgithub-pr-comment-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtharrison%2Fgithub-pr-comment-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtharrison","download_url":"https://codeload.github.com/mtharrison/github-pr-comment-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246108214,"owners_count":20724686,"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":["automation","ci","concourse","golang"],"created_at":"2024-10-02T11:31:00.569Z","updated_at":"2025-03-28T22:26:56.952Z","avatar_url":"https://github.com/mtharrison.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-pr-comment-resource\n\n![master](https://github.com/mtharrison/github-pr-comment-resource/workflows/Master/badge.svg?branch=master) ![Release](https://github.com/mtharrison/github-pr-comment-resource/workflows/Release/badge.svg) ![GitHub release](https://img.shields.io/github/v/release/mtharrison/github-pr-comment-resource) ![report](https://goreportcard.com/badge/github.com/mtharrison/github-pr-comment-resource)\n\nA resource type for [Concourse CI](https://concourse-ci.org/) to trigger builds from Github PR comments. Also allows parameters to be provided in comments.\n \n![image](https://cldup.com/beeBL0NNQ3.png)\n \n ---\n \n## Usage\n \n To use register the resource type using the public [Docker image](https://hub.docker.com/repository/docker/mtharrison/github-pr-comment-resource) `mtharrison/github-pr-comment-resource`.\n\n ```yaml\n resource_types:\n  - name: github-pr-comment-resource\n    type: docker-image\n    source:\n      repository: mtharrison/github-pr-comment-resource\n      tag: v0.2.0\n ```\n Then create a new resource using this resource type. You'll need to provide the `repository`, `access_token`, optionally a `v3_endpoint` if you're using Github Enterprise, otherwise this will default to the public Github API.\n \n Optionally you can provide a `regex` (valid [Go regex](https://golang.org/pkg/regexp/) only). Comments that match this regex only will become new versions. If the regex contains capture groups they will be provided by the resource too.\n\n ```yaml\nresources:\n  - name: deployment-trigger\n    type: github-pr-comment-resource\n    icon: github\n    source:\n      repository: golang/go\n      access_token: '[...]'\n      v3_endpoint: '[...]'\n      regex: '^deploy ([a-zA-Z0-9_.-]+) to ([a-zA-Z0-9_.-]+) please$'\n ```\n Finally you can use the resource as an input/trigger to any jobs.\n ```yaml\njobs:\n  - name: deployment-test\n    plan:\n      - get: deployment-trigger\n        trigger: true\n      - task: echo\n        config:\n          image_resource:\n            type: registry-image\n            source:\n              repository: alpine\n          inputs:\n            - name: deployment-trigger\n          platform: linux\n          run:\n            path: /bin/sh\n            args:\n              - '-c'\n              - |\n                apk add jq \u0026\u003e /dev/null\n                cat deployment-trigger/comment.json | jq\n ```\n In the resource directory a `comment.json` file will be written containing the resource data. See screenshot below:\n \n ![screenshot](https://cldup.com/ZyLNgJX85r.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtharrison%2Fgithub-pr-comment-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtharrison%2Fgithub-pr-comment-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtharrison%2Fgithub-pr-comment-resource/lists"}