mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +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. |
||
---|---|---|
.. | ||
samples | ||
github-add-labels.yaml | ||
README.md |
Add labels to an issue or a pull request
This task
can be used to add labels to a github pull request
or an issue
.
Install the Task
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/github-add-labels/0.1/raw
Parameters
- GITHUB_HOST_URL: The GitHub host, adjust this if you run a GitHub enteprise (default:
api.github.com
). - API_PATH_PREFIX: The API path prefix, GitHub Enterprise has a prefix (e.g.:
api/v3
default:""
). - REQUEST_URL: The GitHub issue or pull request URL where we want to add labels (e.g.
https://github.com/foo/bar/pull/10
). - LABELS: The actual labels to add. Multiple labels can be added in the form of
array
. - GITHUB_TOKEN_SECRET: The name of the
secret
holding the github-token (default:github
). - GITHUB_TOKEN_SECRET_KEY: The name of the
secret key
holding the github-token (default:token
).
Secret
Secret
to provide Githubaccess token
to authenticate to the Github.
Check this to get personal access token for Github
.
Platforms
The Task can be run on linux/amd64
, linux/s390x
and linux/ppc64le
platforms.
Usage
This task expects a secret named github to exists, with a GitHub token in token
with enough privileges to add label to a pull request or an issue.
To add labels to a pull request or an issue, put all the required params, add required secrets and labels will be added to respective pull request or an issue.
Secrets
can be created as follows:
apiVersion: v1
kind: Secret
metadata:
name: github
type: Opaque
stringData:
token: $(personal_github_token)
or
kubectl create secret generic github --from-literal token="MY_TOKEN"
Multiple labels
can be added in Taskrun as follows:
params:
- name: REQUEST_URL
value: https://github.com/Divyansh42/aws-cli/pull/1
- name: LABELS
value:
- approve
- kind/feature
This can be referred to create a Taskrun.