Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update createGithubIssue to re-open recently closed issue #347

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

prudhvigodithi
Copy link
Collaborator

@prudhvigodithi prudhvigodithi commented Oct 30, 2023

Description

Update createGithubIssue to re-open recently closed issue

Testing: Library behaviour

JenkinsFile

lib = library(identifier: 'jenkins@main', retriever: modernSCM([
    $class: 'GitSCMSource',
    remote: 'https://github.com/prudhvigodithi/opensearch-build-libraries.git',
]))

pipeline {
    options {
        timeout(time: 4, unit: 'HOURS')
    }
    agent none
    stages {
        stage('gh-test') {
            agent {label 'Jenkins-Agent-AL2023-X64-C54xlarge-Docker-Host'}
            steps {
                script {
                    createGithubIssue(
                        repoUrl: "https://github.com/prudhvigodithi/job-scheduler.git",
                        issueTitle: "[RELEASE] Release version 3.10.0",
                        issueBody: "test library",
                        label: "v3.9.0",
                        daysToReOpen: "10" // Optional: Tested enabling and disabling 
                    )
                }
            }
        }
    }
} 

New issue

prudhvigodithi/job-scheduler#27

Comment on existing issue

prudhvigodithi/job-scheduler#26 (comment)

Re-open and comment on recently closed issue

Re-open: prudhvigodithi/job-scheduler#26 (comment)
Comment: prudhvigodithi/job-scheduler#26 (comment)

Issues Resolved

opensearch-project/opensearch-build#4171
Coming from the logic opensearch-project/opensearch-build#4171 (comment)

Test with new option daysToReOpen

When passed daysToReOpen: "10" goes back to 10 days from current date 2023-10-20

Screenshot 2023-10-30 at 4 10 34 PM

When now passed daysToReOpen uses default 3 days from current date 2023-10-27

Screenshot 2023-10-30 at 4 11 07 PM

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #347 (9c02549) into main (cfaa0f3) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #347   +/-   ##
=========================================
  Coverage     87.43%   87.43%           
  Complexity       29       29           
=========================================
  Files            81       81           
  Lines           207      207           
  Branches         11       11           
=========================================
  Hits            181      181           
  Misses           19       19           
  Partials          7        7           
Files Coverage Δ
tests/jenkins/jobs/CreateGithubIssue_Jenkinsfile 100.00% <ø> (ø)

vars/createGithubIssue.groovy Outdated Show resolved Hide resolved
vars/createGithubIssue.groovy Outdated Show resolved Hide resolved
Signed-off-by: Prudhvi Godithi <[email protected]>
Copy link
Member

@gaiksaya gaiksaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@prudhvigodithi prudhvigodithi self-assigned this Oct 31, 2023
@prudhvigodithi prudhvigodithi added the enhancement New feature or request label Oct 31, 2023
@prudhvigodithi prudhvigodithi merged commit d19c684 into opensearch-project:main Oct 31, 2023
11 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Prudhvi Godithi <[email protected]>
(cherry picked from commit d19c684)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 5.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants