mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
Fix documentation for the GitHub status task
Improve the documentation for the GitHub status task, fix spelling issues and add link to the GitHub API implemented.
This commit is contained in:
parent
141466b35d
commit
0db76f2345
@ -1,48 +1,48 @@
|
||||
# GitHub
|
||||
# GitHub Set Status
|
||||
|
||||
A collection of tasks to help working with the [GitHub
|
||||
API](https://developer.github.com/v3/).
|
||||
GitHub Set Status is part of a collection of GitHub tasks to help working
|
||||
with the [GitHub API](https://docs.github.com/en/rest/reference).
|
||||
|
||||
## GitHub token
|
||||
|
||||
Most tasks would expect to have a secret set in the kubernetes secret `github`
|
||||
with a GitHub token in the key `token`, you can easily create it on the
|
||||
This task expects a secret set in the kubernetes secret `github`
|
||||
with a GitHub token in the key `token`; you can easily create it on the
|
||||
command line with `kubectl` like this :
|
||||
|
||||
```
|
||||
```shell
|
||||
kubectl create secret generic github --from-literal token="MY_TOKEN"
|
||||
```
|
||||
|
||||
## Set Status on a Commit/PR
|
||||
|
||||
The `github-set-status` task allows external services to mark GtiHUB commits
|
||||
with an `error`, `failure`, `pending`, or `success` state, which is then
|
||||
reflected in pull requests involving those commits.
|
||||
The `github-set-status` task uses the [status api](https://docs.github.com/en/rest/reference/repos#statuses)
|
||||
to mark GitHub commits with an `error`, `failure`, `pending`, or `success`
|
||||
state, which is then reflected in pull requests involving those commits.
|
||||
|
||||
Statuses include as well a `description` and a `target_url`, to give the user
|
||||
informations about the CI statuses or a direct link to the full log.
|
||||
|
||||
### Install the Task
|
||||
|
||||
```
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/github-set-status/0.1/github-set-status.yaml
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* **REPO_FULL_NAME:**: The GitHub repository full name, _e.g:_ `tektoncd/catalog`
|
||||
* **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`
|
||||
* **SHA:**: The commit SHA to set the status for _e.g_: `tektoncd/catalog`
|
||||
* **TARGET_URL:**: The target URL to associate with this status. This URL will
|
||||
* **REPO_FULL_NAME**: The GitHub repository full name, _e.g:_ `tektoncd/catalog`
|
||||
* **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`
|
||||
* **SHA**: The commit SHA to set the status for _e.g_: `tektoncd/catalog`
|
||||
* **TARGET_URL**: The target URL to associate with this status. This URL will
|
||||
be linked from the GitHub UI to allow users to easily see the source of the
|
||||
status. For example you can link to a
|
||||
[dashboard](https://github.com/tektoncd/dashboard) URL so users can follow a
|
||||
Pipeline/Task run.
|
||||
* **DESCRIPTION:**: A short description of the status. _e.g:_ `Building your PR`
|
||||
* **CONTEXT:** The GitHub context, A string label to differentiate this status
|
||||
* **DESCRIPTION**: A short description of the status. _e.g:_ `Building your PR`
|
||||
* **CONTEXT**: The GitHub context, A string label to differentiate this status
|
||||
from the status of other systems. _e.g:_ `continuous-integration/tekton`
|
||||
* **STATE:** The state of the status. Can be one of the following `error`,
|
||||
* **STATE**: The state of the status. Can be one of the following `error`,
|
||||
`failure`, `pending`, or `success`.
|
||||
|
||||
## Usage
|
||||
@ -71,5 +71,5 @@ spec:
|
||||
- name: STATE
|
||||
value: pending
|
||||
- name: TARGET_URL
|
||||
value: https://tekon/dashboard/taskrun/log
|
||||
value: https://tekton/dashboard/taskrun/log
|
||||
```
|
||||
|
@ -11,12 +11,13 @@ metadata:
|
||||
tekton.dev/displayName: "set github status"
|
||||
spec:
|
||||
description: >-
|
||||
This task will set the CI as running and add a link to the openshift console
|
||||
viewer url.
|
||||
This task will set the status of the CI job to the specified value along
|
||||
with a link to the specified target URL where developers can follow the
|
||||
progress of the CI job.
|
||||
|
||||
The `github-set-status` task allows external services to mark GtiHUB commits
|
||||
The `github-set-status` task allows external services to mark GitHub commits
|
||||
with an `error`, `failure`, `pending`, or `success` state, which is then
|
||||
reflected in pull requests involving those commits.Statuses include as well a
|
||||
reflected in pull requests involving those commits. Statuses include as well a
|
||||
`description` and a `target_url`, to give the user informations about the CI
|
||||
statuses or a direct link to the full log.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user