Home

Awesome

GitHub List Repositories Resource

Docker Repository on Quay

Lists the repositories that belong to a GitHub organization or team, but does not clone them.

This resource was implemented to trigger the reconfiguration and deployment of a Concourse CI pipeline which has jobs per repository (and therefore does not need to clone any of the repositories in order to build the pipeline).

Internally uses the GitHub v4 API (GraphQL).

Source Configuration

Example Usage

Resource type definition

resource_types:
- name: github-list-repos
  type: docker-image
  source:
    repository: quay.io/coralogix/concourse-resource-github-list-repos
    tag: v0.5.0

Resource configuration with exclusions

resources:
- name: repo-list
  type: github-list-repos
  source:
    auth_token: ((managed-auth-token))
    org: myorg
    team: myteam
    exclude_regex: "internal-helper|utility"
    exclude:
    - irrelevant
    - legacy-service

Resource configuration with an inclusion regex

resources:
- name: repo-list
  type: github-list-repos
  source:
    auth_token: ((managed-auth-token))
    org: myorg
    team: myteam
    include_regex: "^myprefix-"

Behavior

check : Check for a change in the repository list

The GitHub API is queried for a list of all of the repositories belonging to the org or the team. This list is sorted and hashed, so that subsequent calls will result in the same hash if no repositories have been added or deleted. This hash is returned as the version.

in : Fetch a list of repositories

The GitHub API is queried for a list of all of the repositories belonging to the org or the team. This list is output to a file called repository-list.<ext> where <ext> is defined by the output_format.

Params

out : Not supported

Maintainers

Ari Becker Oded David

License

Apache License 2.0 © Coralogix, Inc.