1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/resources/metadata/githubcommentissue.yaml
Oliver Nocon cf7ca8f791
add step to create a GitHub comment (#2479)
* add step to create a GitHub comment

* add docs

* mandatory parameters

* add command

* Update githubCommentIssue.go

* add groovy library step

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-12-21 16:21:07 +01:00

91 lines
2.7 KiB
YAML

metadata:
name: githubCommentIssue
description: Comment on GitHub issues and pull requests.
longDescription: |
This step allows you to add comments to existing GitHub issues or pull requests.
Pull requests are considered similar to issues and thus adding a comment can be done to an existing pull request as well.
This comes in very handy when you want to make developers aware of certain things during a PR voting process, for example.
spec:
inputs:
secrets:
- name: githubTokenCredentialsId
description: Jenkins 'Secret text' credentials ID containing token to authenticate to GitHub.
type: jenkins
params:
- name: apiUrl
aliases:
- name: githubApiUrl
description: Set the GitHub API url.
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
default: https://api.github.com
mandatory: true
- name: body
description: Defines the content of the comment, e.g. using markdown syntax.
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
- name: number
description: Defines the number of the GitHub issue/pull request.
scope:
- PARAMETERS
- STAGES
- STEPS
type: int
mandatory: true
- name: owner
aliases:
- name: githubOrg
description: Name of the GitHub organization.
resourceRef:
- name: commonPipelineEnvironment
param: github/owner
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
- name: repository
aliases:
- name: githubRepo
description: Name of the GitHub repository.
resourceRef:
- name: commonPipelineEnvironment
param: github/repository
scope:
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
- name: token
aliases:
- name: githubToken
- name: access_token
description: GitHub personal access token as per https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line.
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type: string
mandatory: true
secret: true
resourceRef:
- name: githubTokenCredentialsId
type: secret
- type: vaultSecret
paths:
- $(vaultPath)/github
- $(vaultBasePath)/$(vaultPipelineName)/github
- $(vaultBasePath)/GROUP-SECRETS/github