mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-24 06:15:46 +00:00
e294e1246b
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539 This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization. |
||
---|---|---|
.. | ||
github-close-issue.yaml | ||
README.md |
Close an issue or a pull request
The github-close-issue
task let you close a pull request or an
issue.
Install the Task
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/github-close-issue/0.2/raw
Secrets
This Task requires access to a GitHub token set via a Kubernetes Secret. By default, the name of this Secret should be github
and the secret key should be token
, but you can configure this via the GITHUB_TOKEN_SECRET_NAME
and GITHUB_TOKEN_SECRET_KEY
parameters described below.
To create such a Secret via kubectl
:
kubectl create secret generic github --from-literal token="MY_TOKEN"
Check this to get personal access token for Github
.
See GitHub's documentation on Understanding scopes for OAuth Apps to figure out what scopes you need to give to this token to close an issue or a pull request.
Parameters
- GITHUB_HOST_URL:: The GitHub host domain (default:
api.github.com
) - API_PATH_PREFIX:: The GitHub Enterprise has a prefix for the API path. e.g:
/api/v3
- REQUEST_URL:: The GitHub pull request or issue url, (e.g:
https://github.com/tektoncd/catalog/issues/46
) - GITHUB_TOKEN_SECRET_NAME: The name of the Kubernetes Secret that
contains the GitHub token. (default:
github
). - GITHUB_TOKEN_SECRET_KEY: The key within the Kubernetes Secret that contains the GitHub token. (default:
token
).
Platforms
The Task can be run on linux/amd64
, linux/s390x
and linux/ppc64le
platforms.
Usage
This TaskRun close an issue on a task.
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
labels:
tekton.dev/task: github-close-issue
name: github-close-issue-to-pr-46
spec:
taskRef:
kind: Task
name: github-close-issue
params:
- name: REQUEST_URL
value: https://github.com/chmouel/scratchpad/pull/46