{"id":15517342,"url":"https://github.com/mschuchard/concourse-github-issue-resource","last_synced_at":"2025-08-08T14:08:34.981Z","repository":{"id":213752640,"uuid":"734110143","full_name":"mschuchard/concourse-github-issue-resource","owner":"mschuchard","description":"A Concourse resource for Github Issues","archived":false,"fork":false,"pushed_at":"2025-06-08T10:29:29.000Z","size":221,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T11:26:38.274Z","etag":null,"topics":["concourse","concourse-ci","concourse-ci-resource","concourse-resource","github-issue","github-issues"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mschuchard.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,"zenodo":null}},"created_at":"2023-12-20T22:27:45.000Z","updated_at":"2025-06-08T10:29:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddea861a-aff3-412c-87ed-21654fd6027a","html_url":"https://github.com/mschuchard/concourse-github-issue-resource","commit_stats":null,"previous_names":["mschuchard/concourse-github-issue-resource"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mschuchard/concourse-github-issue-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschuchard%2Fconcourse-github-issue-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschuchard%2Fconcourse-github-issue-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschuchard%2Fconcourse-github-issue-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschuchard%2Fconcourse-github-issue-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mschuchard","download_url":"https://codeload.github.com/mschuchard/concourse-github-issue-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschuchard%2Fconcourse-github-issue-resource/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269432993,"owners_count":24415971,"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-08-08T02:00:09.200Z","response_time":72,"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":["concourse","concourse-ci","concourse-ci-resource","concourse-resource","github-issue","github-issues"],"created_at":"2024-10-02T10:12:45.684Z","updated_at":"2025-08-08T14:08:34.968Z","avatar_url":"https://github.com/mschuchard.png","language":"Rust","readme":"# Concourse Github Issue Resource\n\nA [concourse-ci](https://concourse-ci.org) resource for interacting with [Github Issues](https://docs.github.com/en/issues/tracking-your-work-with-issues).\n\nThis resource's container image is currently hosted at [matthewschuchard/concourse-github-issue-resource](https://hub.docker.com/repository/docker/matthewschuchard/concourse-github-issue-resource) for usage within Concourse.\n\nThis repository and project is based on the work performed for [MITODL](https://github.com/mitodl/concourse-github-issue-resource), and now serves as an upstream for the project hosted within that organization. Accordingly it maintains the BSD-3 license with copyright notice.\n\n## Behavior\n\n### `source`: designates the Github repository, issue number, and personal access token\n\n**parameters**\n- `pat`: _required/optional_ The personal access token for authentication and authorization. If anonymous read and write for Issues is permitted, then this is optional for the `check` and `out` steps. Otherwise it is required for private repos, or any other situation where anonymous read and write for Issues is not authorized.\n\n- `owner`: _required_ The owner of the target repository expressed as either a user or organization.\n\n- `repo`: _required_ The Github repository with the issue tracker in which to read and/or write issues.\n\n- `skip_check`: _optional_ A boolean that signifies whether to skip the `check` step or not. This is primarily useful for situations where it is known that a specified issue does not exist, and instead must be created during `out`. The default value is `false`.\n\n- `trigger`: _optional_ The issue state that causes a trigger during the `check` step. This can be either `open` or `closed`. The default value is `closed`.\n\n- `number`: _optional/required_ The issue number to read during the `check` step for triggering Concourse pipelines based on the issue state, or for updating during the `out` step. If this is omitted then instead a list operation with filters (i.e. \"search\") occurs to determine the issue during the `check` step, and a create operation during the `out` step. Therefore this is implicitly required if an issue update is desired as a new issue creation attempt will occur during `out` otherwise.\n\nThe following parameters are for filtering from a list of issues to one issue (i.e. \"search\") during the `check` step, and therefore their values are ignored when an input value is specified for the `number` parameter.\n\n- `state`: _optional_ The current state of the searched issue. This can be either `open`, `closed`, or `all`.\n\n- `milestone`: _optional_ The numeric ID of the milestone associated with the searched issue.\n\n- `assignee`: _optional_ The user name of the assignee for the searched issue.\n\n- `labels`: _optional_ The list of labels for the searched issue.\n\n### `version`: designates the Github issue state\n\n**parameters**\n- `version`: _optional_ The state of the issue specified in the `source` expressed as the enum `closed` or `open` (note the states' serialization is implemented by Octocrab to be lowercase strings). This is an output only and is ignored as an input parameter.\n\n```yaml\nversion:\n  state: \u003cissue state\u003e\n```\n\n### `check`: returns size two list for closed Github issues and size one list for open Github issues\n\nThe `check` step determines the state of the specified Github issue. If the state is `closed` (default behavior; otherwise `trigger` source parameter value) then the returned list of versions is size two. If the state is `open` (default behavior; otherwise NOT `trigger` source parameter value) then the returned list of versions is size one. This is specifically to trigger pipelines based on the issue state (`closed` triggers and `open` does not trigger by default; otherwise customized by `trigger` source parameter value) because it simulates a delta of versions for `closed` and not `open` (default). The actual returns are the following (note the states' serialization is implemented by Octocrab to be lowercase strings):\n\ntrigger:\n```json\n[{\"state\":\"open\"},{\"state\":\"closed\"}]\n```\n\nno trigger:\n```json\n[{\"state\":\"open\"}]\n```\n\n### `in`: currently unused\n\nThis ignores any inputs and quickly dummies outputs, and therefore is primarily useful for executing an efficient `check` step with minimal overhead.\n\n### `out`: creates or updates a Github issue\n\nThe `out` step updates or creates a Github issue according to the input parameters below. The number of the created Github issue is written to a file at `/opt/resource/issue_number.txt` so that it can be re-used later in the build (especially for a subsequent `check` step to trigger Concourse steps based on the status of the Github issue created during this step).\n\nRecall that the parameter which determines whether a create or update operation occurs during this step is `source.number` (update when a specific existing issue number is specified; otherwise create).\n\nThe metadata output from this step contains the number, url, title, state, labels, assignees, milestone, created time, and last updated time for the issue.\n\n- `title`: _optional/required_ The title of the written Github issue (required for new issue).\n\n- `body`: _optional_ The body of the written Github issue.\n\n- `labels`: _optional_ The list of labels for the written Github issue.\n\n- `assignees`: _optional_ The list of assignees for the written Github issue.\n\n- `milestone`: _optional_ The milestone numeric ID to associate with the written Github issue.\n\n- `state`: _optional_ The desired state of the updated issue. This can be either `open` or `closed`.\n\n### Metadata\n\nBelow is the general structure of the generated Concourse metadata. Note that the `labels` and `assignees`  keys will not exist if their value is empty, and the `milestone` key will not exist if its value is `null`.\n\n```json\n{\n  \"number\": \"issue number\",\n  \"url\": \"issue url\",\n  \"title\": \"issue title\",\n  \"state\": \"open|closed\",\n  \"labels\": [\"issue labels (see below doc link)\"],\n  \"assignees\": [\"issue assignees (see below doc link)\"],\n  \"milestone\": \"issue milestone (see below doc link)\",\n  \"created\": \"issue creation time\",\n  \"updated\": \"issue updated time\"\n}\n```\n\nOctocrab doc links for model serialization:  \n[Label](https://docs.rs/octocrab/latest/octocrab/models/struct.Label.html)  \n[Assignee](https://docs.rs/octocrab/latest/octocrab/models/struct.Author.html)  \n[Milestone](https://docs.rs/octocrab/latest/octocrab/models/struct.Milestone.html)\n\n## Example\n\n```yaml\nresource_types:\n- name: github_issue\n  type: docker-image\n  source:\n    repository: matthewschuchard/concourse-github-issue-resource:1.2\n    tag: latest\n\nresources:\n- name: github-issue\n  type: github-issue\n  source:\n    pat: abcdefg12345!\n    owner: mitodl\n    repo: ol-infrastructure\n    skip_check: true\n- name: github-issue-check\n  type: github-issue\n  source:\n    owner: mitodl\n    repo: ol-infrastructure\n    number: 1\n\njobs:\n- name: do something\n  plan:\n  - get: my-code\n  - task: something cool\n    file: foo.yml\n    on_failure:\n      put: github-issue\n      params:\n        title: concourse failed\n        body: go fix it\n        assignees:\n        - my_user\n        - your_user\n  - get: githhub-issue-check\n```\n\n## Contributing\nCode should pass all unit and acceptance tests. New features should involve new unit tests.\n\nPlease consult the GitHub Project for the current development roadmap.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmschuchard%2Fconcourse-github-issue-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmschuchard%2Fconcourse-github-issue-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmschuchard%2Fconcourse-github-issue-resource/lists"}