Mattermost-plugin-github: Links in todo messages should be consistent, include repo info

Created on 21 Jan 2020  路  11Comments  路  Source: mattermost/mattermost-plugin-github

The output of /github todo lists PRs, and assignments differs from that of Messages.

image

  1. They should be consistent
  2. They should include both the repo reference, and the PR title.
  3. bonus: Unread messages should indicate if PR or Issue

Suggested format: [org/repo-last-token-ellipsis](repoURL)[PR/IssueID title](issueURL)
The repo name should be parsed, and shortened to its last word, with an ellipsis prepended if truncated. The title should probably be truncated at say 256 characters, just in case?

example:

Unread Messages

You have 8 unread messages:

Review Requests

You have 1 pull requests awaiting your review:

Your Open Pull Requests

You have 2 open pull requests:
...

Easy Good First Issue Help Wanted TecGo TypEnhancement

All 11 comments

cc @aaronrothschild @asaadmahmood for copy/formatting suggestions

Bonus Bonus: I will go on a limb and say that it may be useful to GROUP the messages/issues/PRs within the sections by repo (IF there is >1 issue/PR for that repo in the list).

@levb @asaadmahmood Curious if you think it would help to present the summary in a tabular format (1 table per section)? Then the repo/org is more clearly visible.

something like (sorry, can't be bothered to get this markdown right - not rendering):
|Message | Org | Repo | Issue |
| --- | --- | --- | --- |
| Hey I think this thing could be positioned highe... | mattermost | mattermost-server | Issue 2938 |
| Not bad thinking but I need to think more about... | mattermost | jira-plugin | Issue 8 |

-1 for tables, they consume too much space.

I'd like to take this up.

@checkaayush go for it! A personal thank you if you get it done!

@levb In the suggested format [org/repo-last-token-ellipsis](repoURL)[PR/IssueID title](issueURL), if the title is going to be a hyperlink, isn't the PR/IssueID before it redundant?

I'd like to suggest the following:

If we want overall consistency at the cost of some redundancy, we can even use the format picked for unread messages and apply it in all other categories.

Suggestions? @aaronrothschild

@checkaayush I like your suggestion. It may be a good idea to post this for discussing in the Plugin: GitHub channel on community - I expect more opinions on the matter.

@checkaayush I like your suggestion. It may be a good idea to post this for discussing in the Plugin: GitHub channel on community - I expect more opinions on the matter.

@checkaayush Agree with Lev, I will take any developer suggestions over mine :)

I'm going ahead with development as per my suggestion here: https://github.com/mattermost/mattermost-plugin-github/issues/178#issuecomment-585133677. Have posted the suggested format on Plugin: GitHub channel for comments from the community.

I'll extract the message formatting logic in a separate function so that changing (and testing) it as desired becomes trivial.

I agree with @levb. Tables take too much space.

Assumptions I'm making during development:

  • Trimming title to 80 characters with ellipsis as suffix.
  • Repository names, when having multiple words, will be separated by hyphens -.

If any of the assumptions seem inappropriate, let me know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tgly307 picture tgly307  路  3Comments

mickmister picture mickmister  路  3Comments

mattermod picture mattermod  路  6Comments

jfrerich picture jfrerich  路  5Comments

crudolf picture crudolf  路  3Comments