forked from opensearch-project/opensearch-build-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateGithubIssue_Jenkinsfile.txt
13 lines (13 loc) · 1.64 KB
/
CreateGithubIssue_Jenkinsfile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
CreateGithubIssue_Jenkinsfile.run()
CreateGithubIssue_Jenkinsfile.pipeline(groovy.lang.Closure)
CreateGithubIssue_Jenkinsfile.echo(Executing on agent [label:none])
CreateGithubIssue_Jenkinsfile.stage(createGithubIssue, groovy.lang.Closure)
CreateGithubIssue_Jenkinsfile.script(groovy.lang.Closure)
CreateGithubIssue_Jenkinsfile.createGithubIssue({repoUrl=https://github.com/opensearch-project/opensearch-build, issueTitle=Test GH issue title, issueBody=Test GH issue body, label=label101, daysToReOpen=5})
createGithubIssue.usernamePassword({credentialsId=jenkins-github-bot-token, passwordVariable=GITHUB_TOKEN, usernameVariable=GITHUB_USER})
createGithubIssue.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure)
createGithubIssue.sh({script=gh issue list --repo https://github.com/opensearch-project/opensearch-build -S "Test GH issue title in:title" --label label101 --json number --jq '.[0].number', returnStdout=true})
createGithubIssue.sh({script=date -d "5 days ago" +'%Y-%m-%d', returnStdout=true})
createGithubIssue.sh({script=gh issue list --repo https://github.com/opensearch-project/opensearch-build -S "Test GH issue title in:title is:closed closed:>=2023-10-24" --label label101 --json number --jq '.[0].number', returnStdout=true})
createGithubIssue.println(Issue already exists, adding a comment)
createGithubIssue.sh({script=gh issue comment 22 --repo https://github.com/opensearch-project/opensearch-build --body "Test GH issue body", returnStdout=true})