forked from opensearch-project/opensearch-build-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditGithubIssue_Jenkinsfile_IssueBody.txt
15 lines (15 loc) · 1.6 KB
/
EditGithubIssue_Jenkinsfile_IssueBody.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
EditGithubIssue_Jenkinsfile.run()
EditGithubIssue_Jenkinsfile.pipeline(groovy.lang.Closure)
EditGithubIssue_Jenkinsfile.echo(Executing on agent [label:none])
EditGithubIssue_Jenkinsfile.stage(createGithubIssue, groovy.lang.Closure)
EditGithubIssue_Jenkinsfile.script(groovy.lang.Closure)
EditGithubIssue_Jenkinsfile.createGithubIssue({repoUrl=https://github.com/opensearch-project/opensearch-build, issueTitle=Test GH issue title, issueBodyFile=issueBody.md, issueEdit=true, label=label101})
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" --json number --jq '.[0].number', returnStdout=true})
createGithubIssue.sh({script=date -d "3 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:>=bbb
ccc" --json number --jq '.[0].number', returnStdout=true})
createGithubIssue.println(Issue already exists, editing the issue body)
createGithubIssue.sh({script=gh issue edit bbb
ccc --repo https://github.com/opensearch-project/opensearch-build --body-file issueBody.md, returnStdout=true})