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

Previliged -> Privileged on Repo model #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions pkg/database/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const repoTable = "repos"
// SQL Queries to retrieve a list of all repos belonging to a User.
const repoStmt = `
SELECT id, slug, host, owner, name, private, disabled, disabled_pr, scm, url, username, password,
public_key, private_key, params, timeout, priveleged, created, updated, user_id, team_id
public_key, private_key, params, timeout, privileged, created, updated, user_id, team_id
FROM repos
WHERE user_id = ? AND team_id = 0
ORDER BY slug ASC
Expand All @@ -22,7 +22,7 @@ ORDER BY slug ASC
// SQL Queries to retrieve a list of all repos belonging to a Team.
const repoTeamStmt = `
SELECT id, slug, host, owner, name, private, disabled, disabled_pr, scm, url, username, password,
public_key, private_key, params, timeout, priveleged, created, updated, user_id, team_id
public_key, private_key, params, timeout, privileged, created, updated, user_id, team_id
FROM repos
WHERE team_id = ?
ORDER BY slug ASC
Expand All @@ -31,15 +31,15 @@ ORDER BY slug ASC
// SQL Queries to retrieve a repo by id.
const repoFindStmt = `
SELECT id, slug, host, owner, name, private, disabled, disabled_pr, scm, url, username, password,
public_key, private_key, params, timeout, priveleged, created, updated, user_id, team_id
public_key, private_key, params, timeout, privileged, created, updated, user_id, team_id
FROM repos
WHERE id = ?
`

// SQL Queries to retrieve a repo by name.
const repoFindSlugStmt = `
SELECT id, slug, host, owner, name, private, disabled, disabled_pr, scm, url, username, password,
public_key, private_key, params, timeout, priveleged, created, updated, user_id, team_id
public_key, private_key, params, timeout, privileged, created, updated, user_id, team_id
FROM repos
WHERE slug = ?
`
Expand Down
2 changes: 1 addition & 1 deletion pkg/database/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CREATE TABLE repos (
,private BOOLEAN
,disabled BOOLEAN
,disabled_pr BOOLEAN
,priveleged BOOLEAN
,privileged BOOLEAN
,timeout INTEGER
,scm VARCHAR(25)
,url VARCHAR(1024)
Expand Down
2 changes: 1 addition & 1 deletion pkg/database/schema/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CREATE TABLE repos (
,private BOOLEAN
,disabled BOOLEAN
,disabled_pr BOOLEAN
,priveleged BOOLEAN
,privileged BOOLEAN
,timeout INTEGER

,scm VARCHAR(25)
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ type Repo struct {
// before exceeding its timelimit and being killed.
Timeout int64 `meddler:"timeout" json:"timeout"`

// Indicates the build should be executed in priveleged
// Indicates the build should be executed in privileged
// mode. This could, for example, be used to run Docker in Docker.
Priveleged bool `meddler:"priveleged" json:"priveleged"`
Privileged bool `meddler:"privileged" json:"privileged"`

// Foreign keys signify the User that created
// the repository and team account linked to
Expand Down