Mattermost-plugin-github: Add "Create Github Issue" similar to Jira plugin

Created on 9 Sep 2019  路  15Comments  路  Source: mattermost/mattermost-plugin-github

Hard Help Wanted TecGo TecReactJS TypEnhancement

All 15 comments

@levb I am interested in implementing this. Is the goal of this to be able to create github issues via /github create issues <title> <body> ...?

@dhadiseputro Thank you for taking a look at this issue! What you proposed would be the simplest implementation. In the Jira plugin we support UI from the ... menu of a post, it pre-populates the issue description, and has (limited) support for other custom fields. Ultimately we'd want something like that.

I see, can you show me the UI part for the Jira plugin? I am not too great with UI, I can follow what you have in Jira and expand on that. I am thinking that the UI modal to be triggered by /github create issue?

@dhadiseputro We just had another contributor submit a similar change, https://github.com/mattermost/mattermost-plugin-github/pull/120, you can probably get the gist of what needs to be done from there.

Jira has a lot of complexity dealing with custom fields, and their types - you likely won't need much of that with GitHub.

thanks! I will take a look at #120 and add upon it to create new github issues.

can you show me where the entry point for /jira create? I am looking for it in command.go (https://github.com/mattermost/mattermost-plugin-jira/blob/master/server/command.go#L46), it does not have create. I am kinda new here, so please bear with me :)
Thanks!

You have to create a create issue handler in server/api.go like this: https://github.com/mattermost/mattermost-plugin-github/pull/120/files#diff-0d5a44e9b96f048fa52b477ce6be6253R532 . We are using google github client. It has a function to create issue.

githubClient.Issues.Create(ctx context.Context, owner string, repo string, issue *github.IssueRequest) (*github.Issue, *github.Response, error)

Then you have to add a context menu item in message similar to https://github.com/mattermost/mattermost-plugin-github/pull/120 to create new issue from webapp.

The entry point in jira plugin is not a slash command but drop down menu register in jira plugin.jsx https://github.com/mattermost/mattermost-plugin-jira/blob/402eed5de9974e83b18c14acfe3a579fd5921c9c/webapp/src/plugin.jsx#L31

Hope that helps. If you need more help you can ping me on @niklabh in community.mattermost.com

Okay thanks a lot! That really helps! :)

Its the react class which is being connected with redux at line 28

If I have some questions, can I create a PR to show you guys what I have so far?

Sure, we can always provide feedback on a WIP PR.

okay will clean it up and create the PR, I try to understand what is happening first and make sure the workflow looks correct (because I am new to react redux).

123

Was this page helpful?
0 / 5 - 0 ratings