-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
chore: change issue mail title. #7064
Conversation
Signed-off-by: Bo-Yi Wu <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #7064 +/- ##
==========================================
- Coverage 41.44% 41.43% -0.01%
==========================================
Files 442 442
Lines 59643 59643
==========================================
- Hits 24717 24714 -3
- Misses 31696 31699 +3
Partials 3230 3230
Continue to review full report at Codecov.
|
models/issue_mail.go
Outdated
@@ -16,7 +16,7 @@ import ( | |||
) | |||
|
|||
func (issue *Issue) mailSubject() string { | |||
return fmt.Sprintf("[%s] %s (#%d)", issue.Repo.Name, issue.Title, issue.Index) | |||
return fmt.Sprintf("[%s/%s] %s (#%d)", issue.Repo.OwnerName, issue.Repo.Name, issue.Title, issue.Index) |
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.
Could you confirm .OwnerName
has been filled?
models/issue_mail.go
Outdated
@@ -16,7 +16,7 @@ import ( | |||
) | |||
|
|||
func (issue *Issue) mailSubject() string { | |||
return fmt.Sprintf("[%s] %s (#%d)", issue.Repo.Name, issue.Title, issue.Index) | |||
return fmt.Sprintf("[%s/%s] %s (#%d)", issue.Repo.OwnerName, issue.Repo.Name, issue.Title, issue.Index) |
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.
Are we sure that Repo.OwnerName is definitely set? If not we might need:
return fmt.Sprintf("[%s/%s] %s (#%d)", issue.Repo.OwnerName, issue.Repo.Name, issue.Title, issue.Index) | |
return fmt.Sprintf("[%s/%s] %s (#%d)", issue.Repo.MustOwnerName(), issue.Repo.Name, issue.Title, issue.Index) |
But then you need to check that we're not in a session otherwise we might deadlock.
Signed-off-by: Bo-Yi Wu <[email protected]>
* chore: change issue mail title. Signed-off-by: Bo-Yi Wu <[email protected]> * change to fullname method Signed-off-by: Bo-Yi Wu <[email protected]>
See: https://gitea.com/gitea/log/issues/9
before:
after: