-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Added close and reopen commands. Fixes #9 #14
Conversation
409021a
to
e3eae73
Compare
Thank you Richard 🤖 |
Can we do the close/open command without a comment in-line? |
README.md
Outdated
``` | ||
|
||
**Testing** | ||
|
||
Create a label of "no-dco" within every project you want Derek to help you with. | ||
Try creating a label of "no-dco" within a project you want Derek to help you with. |
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.
Not sure this line needed to change
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.
I changed that because reading it stepwise it appears as an instruction; that is, in order to enable Derek to manage/monitor a repo the user should manually create a no-dco
label within that repo. I think its actually a lead-in to the following statement - the change was meant to move more towards a description of the following action.
No big deal to me, it can come out.
commentHandler.go
Outdated
|
||
if allowed { | ||
client, ctx := makeClient() | ||
state := "closed" |
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.
Can we extract closed/open to consts please?
e3eae73
to
5da7743
Compare
Signed-off-by: rgee0 <[email protected]>
5da7743
to
86e9d2e
Compare
Removed the comment (and colon) from reopen and close commands. Reverted the testing part of README - please consider earlier comments on reasoning. Extracted the constants. Merged the switch cases for reopen & close |
I think the comment would just be anything after a new line and would have to work for all commands. |
@@ -157,6 +186,12 @@ func parse(body string) *types.CommentAction { | |||
return &commentAction | |||
} | |||
|
|||
func isValidCommand(body string, trigger string) bool { |
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 should be unit-testable. Would you be able to follow up in a new PR?
Merging, thank you @rgee0 |
Signed-off-by: rgee0 [email protected]
Added the ability for maintainers to close and reopen issues & PRs to address #9
Also performed minimal update the README.md to include the new commands and add an updated
faas-cli deploy
command.Tested on one of my own [repos] (rgee0/Test#3) used for testing.