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

githubCreateIssue_fix #4151

Merged
merged 20 commits into from
Dec 15, 2022
Merged

githubCreateIssue_fix #4151

merged 20 commits into from
Dec 15, 2022

Conversation

raman-susla-epam
Copy link
Member

@raman-susla-epam raman-susla-epam commented Dec 8, 2022

Changes

ghCreateIssue throws error when message body exceeds 65536 characters
For some cases body reaches the limit of issues body (65536 characters)

Possible solution: once body reaches the limit - split leftovers into the comments

  • Tests
  • Documentation

@raman-susla-epam raman-susla-epam requested a review from a team as a code owner December 8, 2022 12:56
@catmorte
Copy link

/it-go

1 similar comment
@catmorte
Copy link

/it-go

@jliempt jliempt self-requested a review December 14, 2022 15:11
Copy link
Member

@jliempt jliempt left a comment

Choose a reason for hiding this comment

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

Looks neat! I noticed an issue though.

I have tested it with a test repository, but I think it can happen that the POST requests are made too fast after each other when the body is split up in chunks. When slowly stepping through the code it works well, but when running it normally, I saw it happening that multiple issues are opened with the chunks.

Comment on lines +36 to +43
- name: chunkSize
description: Defines size of the chunk. If content exceed chunk size it'll be sliced into chunks and stored in comments
scope:
- PARAMETERS
- STAGES
- STEPS
type: int
default: 65500
Copy link
Member

Choose a reason for hiding this comment

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

Should it be made clear what the maximum value is? Or what happens if you set chunkSize above it?

cmd/githubCreateIssue_test.go Outdated Show resolved Hide resolved
@jliempt
Copy link
Member

jliempt commented Dec 15, 2022

/it-go

@raman-susla-epam raman-susla-epam merged commit d7cf865 into master Dec 15, 2022
@raman-susla-epam raman-susla-epam deleted the githubCreateIssue-fix branch December 15, 2022 15:20
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
* extend githubCreateIssue to handle long body

Co-authored-by: Jordi van Liempt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants