Repository navigation
Issue #1038 - Include comment on pr close #1123
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
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4d0eaf2
Issue #1038 - Include comment on pr close
fa3782d
added function addcomment to add comment on any pr - issue #1038
d1eb6e7
Checking for error exceptions
dc97aea
Removing ; at end of line
c3635cf
Include test for error on call
2de2667
Include test for error on call
0665250
Adding test cases
59db2b1
Changing deprecated os.SEEK_SET and testing calls
0d1e938
Correcting lint for io.seek
6f9d393
Correcting lint for io.seek
d919e83
Correcting lint for io.seek
05df74a
undoing format changes
1637884
Correcting lint for io.seek
00f76be
Correcting lint for io.seek
eb1cb99
Removing gh pr comment for review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| package command | ||
|
|
||
| import ( | ||
| "io" | ||
| "io/ioutil" | ||
| "os" | ||
| ) | ||
|
|
||
| //EnabledTestingModeforComment is to simulate keypress on comments for Testing | ||
| var EnabledTestingModeforComment bool = false | ||
|
|
||
| //TemporariFileforKeyPress is a tmpfile to simulate input text for Testing | ||
| var TemporariFileforKeyPress *os.File | ||
|
|
||
| //DisableTestingModeforComment will disable simulate keypress | ||
| func DisableTestingModeforComment() error { | ||
| EnabledTestingModeforComment = false | ||
| defer TemporariFileforKeyPress.Close() | ||
| return nil | ||
| } | ||
|
|
||
| //EnableTestingModeforComment will enable simulate keypress | ||
| func EnableTestingModeforComment() error { | ||
| EnabledTestingModeforComment = true | ||
| in, err := ioutil.TempFile("", "") | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| TemporariFileforKeyPress = in | ||
|
|
||
| return nil | ||
| } | ||
|
|
||
| //SimulateUserInput is to simulate keypress on comments for Testing | ||
| func SimulateUserInput(text string) error { | ||
| _, err := io.WriteString(TemporariFileforKeyPress, text) | ||
| if err != nil { | ||
| return (err) | ||
| } | ||
|
|
||
| _, err = TemporariFileforKeyPress.Seek(0, io.SeekStart) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| return nil | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I'm glad you used the githubv4 pattern instead of our old string-based graphql pattern!