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

Added close and reopen commands. Fixes #9 #14

Merged
merged 1 commit into from
Oct 29, 2017

Conversation

rgee0
Copy link
Contributor

@rgee0 rgee0 commented Oct 24, 2017

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.

@rgee0 rgee0 force-pushed the addIssueCloseReopen branch from 409021a to e3eae73 Compare October 24, 2017 19:08
@alexellis
Copy link
Owner

Thank you Richard 🤖

@alexellis
Copy link
Owner

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.
Copy link
Owner

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

Copy link
Contributor Author

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.


if allowed {
client, ctx := makeClient()
state := "closed"
Copy link
Owner

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?

@rgee0 rgee0 force-pushed the addIssueCloseReopen branch from e3eae73 to 5da7743 Compare October 28, 2017 15:57
@rgee0 rgee0 force-pushed the addIssueCloseReopen branch from 5da7743 to 86e9d2e Compare October 28, 2017 16:01
@rgee0
Copy link
Contributor Author

rgee0 commented Oct 28, 2017

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

@alexellis
Copy link
Owner

please consider earlier comments on reasoning.

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 {
Copy link
Owner

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?

@alexellis
Copy link
Owner

Merging, thank you @rgee0

@alexellis alexellis merged commit d0210a7 into alexellis:master Oct 29, 2017
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.

2 participants