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

Move create/fork repository from models to modules/repository #9489

Merged
merged 9 commits into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Move create/fork repository from models to modules/repository
  • Loading branch information
lunny committed Jan 12, 2020
commit f65794bc5d4bea8dfd52e176a8fb0c6466a86335
8 changes: 4 additions & 4 deletions models/issue_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
// GetLabelTemplateFile loads the label template file by given name,
// then parses and returns a list of name-color pairs and optionally description.
func GetLabelTemplateFile(name string) ([][3]string, error) {
data, err := getRepoInitFile("label", name)
data, err := GetRepoInitFile("label", name)
if err != nil {
return nil, fmt.Errorf("getRepoInitFile: %v", err)
return nil, fmt.Errorf("GetRepoInitFile: %v", err)
}

lines := strings.Split(string(data), "\n")
Expand Down Expand Up @@ -175,8 +175,8 @@ func initalizeLabels(e Engine, repoID int64, labelTemplate string) error {
}

// InitalizeLabels adds a label set to a repository using a template
func InitalizeLabels(repoID int64, labelTemplate string) error {
return initalizeLabels(x, repoID, labelTemplate)
func InitalizeLabels(ctx DBContext, repoID int64, labelTemplate string) error {
return initalizeLabels(ctx.e, repoID, labelTemplate)
}

func newLabel(e Engine, label *Label) error {
Expand Down
Loading