You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: github.go
    path of file: ./repos/studygolang/internal/logic
    
    the code of the file until where you have to start completion: // Copyright 2017 The StudyGolang Authors. All rights reserved.
// Use of this source code is governed by 
    
func (self GithubLogic) issueTranslated(_prInfo *prInfo, title string) error {
	md5 := goutils.Md5(title)
	gcttGit := &model.GCTTGit{}
	_, err := MasterDB.Where("md5=?", md5).Get(gcttGit)
	if err != nil {
		logger.Errorln("GithubLogic insertOrUpdateGCCT get error:", err)
		return err
	}

	if gcttGit.Id > 0 {
		return nil
	}

	gcttUser := DefaultGCTT.FindOne(nil, _prInfo.username)

	session := MasterDB.NewSession()
	defer session.Close()
	session.Begin()

	if gcttUser.Id == 0 {
		gcttUser.Username = _prInfo.username
		gcttUser.Avatar = _prInfo.avatar
		gcttUser.JoinedAt = _prInfo.prTime.Unix()
		_, err = session.Insert(gcttUser)
		if err != nil {
			session.Rollback()
			logger.Errorln("GithubLogic issueTranslated insert gctt_user error:", err)
			return err
		}
	}

	gcttGit.Username = _prInfo.username
	gcttGit.Title = title
	gcttGit.Md5 = md5
	gcttGit.PR = _prInfo.number
	gcttGit.TranslatedAt = _prInfo.prTime.Unix()
	_, err = MasterDB.Insert(gcttGit)
	if err != nil {
		session.Rollback()
		logger.Errorln("GithubLogic issueTranslated insert error:", err)
		return err
	}

	session.Commit()
	return nil
}