mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 10:12:06 +03:00
Merge pull request #195 from A-Hilaly/gitlab-import-fix
bridge/gitlab: importer handle mentions in other issue and merge requets
This commit is contained in:
commit
146894a565
@ -267,7 +267,9 @@ func (gi *gitlabImporter) ensureNote(repo *cache.RepoCache, b *cache.BugCache, n
|
||||
NOTE_CHANGED_DUEDATE,
|
||||
NOTE_REMOVED_DUEDATE,
|
||||
NOTE_LOCKED,
|
||||
NOTE_UNLOCKED:
|
||||
NOTE_UNLOCKED,
|
||||
NOTE_MENTIONED_IN_ISSUE,
|
||||
NOTE_MENTIONED_IN_MERGE_REQUEST:
|
||||
return nil
|
||||
|
||||
default:
|
||||
|
@ -23,6 +23,8 @@ const (
|
||||
NOTE_UNASSIGNED
|
||||
NOTE_CHANGED_MILESTONE
|
||||
NOTE_REMOVED_MILESTONE
|
||||
NOTE_MENTIONED_IN_ISSUE
|
||||
NOTE_MENTIONED_IN_MERGE_REQUEST
|
||||
NOTE_UNKNOWN
|
||||
)
|
||||
|
||||
@ -83,6 +85,14 @@ func GetNoteType(n *gitlab.Note) (NoteType, string) {
|
||||
return NOTE_REMOVED_MILESTONE, ""
|
||||
}
|
||||
|
||||
if strings.HasPrefix(n.Body, "mentioned in issue") {
|
||||
return NOTE_MENTIONED_IN_ISSUE, ""
|
||||
}
|
||||
|
||||
if strings.HasPrefix(n.Body, "mentioned in merge request") {
|
||||
return NOTE_MENTIONED_IN_MERGE_REQUEST, ""
|
||||
}
|
||||
|
||||
return NOTE_UNKNOWN, ""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user