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

Display user/organization in email subject #44

Closed
wants to merge 1 commit into from
Closed

Display user/organization in email subject #44

wants to merge 1 commit into from

Conversation

crazy-max
Copy link

@crazy-max crazy-max commented Jul 16, 2018

Orig #39

@vfeskov
Copy link
Owner

vfeskov commented Jul 16, 2018

thanks @crazy-max , i acknowledge the problem 100%, but there was another problem of subjects being too long, which was mitigated by omitting org name.

What I had in mind for a universal solution is to have certain repo names like core to always be preceded by org name.

Easiest implementation would be to go through all the repos in the db manually and make a list of those repos, that exist in multiple organisations, e.g., core in angular/core and facebook/core. Then this list can be used to prepend org name to repo in email subject

@crazy-max
Copy link
Author

crazy-max commented Jul 16, 2018

Hi @vfeskov, according to RFC 2822, section 2.1.1 :

There are two limits that this standard places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

So we cannot go up 78 characters for email subject but :

  • Git branch/tag name can have up to 255 characters.
  • GitHub limit the user/org and repo name up to 100 characters.

After observation we can therefore conclude that we can potentially arrive at a number of 355 characters today in the email subject or 455 if you merge my PR (+100 for org/user).

I think we can deal with this with a ratio limitation of chars for org|user, repo, tag :

  • org|user : 22 max
  • repo : 22 max
  • tag : 34 max

What do you think ?

@vfeskov
Copy link
Owner

vfeskov commented Jul 16, 2018

@crazy-max i did not mean that there was technical limitation on subject length, so far i've been sending emails with huge subjects and not getting them bounced from any mail server

Problem lies in UX: since a lot of repos actually have fully contained names, e.g. angular or react, there's no value in specifying the org name for those but the org names do extend subject significantly, and longer subjects are harder to digest

what i suggest is when making a subject to use a constant array, that would contain names of those special repos with generic names, e.g., const GENERIC_REPO_NAMES = ['core', 'server', 'util']. I would fill it with more repos according to the data I have in the db

@crazy-max
Copy link
Author

Oh ok, LGTM :)

@crazy-max
Copy link
Author

crazy-max commented Jul 16, 2018

Maybe also add a bool flag in the user's options to allow to display org ?

@crazy-max
Copy link
Author

We can close it now

@crazy-max crazy-max closed this Sep 15, 2018
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