diff --git a/drone-go/drone/types.go b/drone-go/drone/types.go index 305a52968..d25d4ca96 100644 --- a/drone-go/drone/types.go +++ b/drone-go/drone/types.go @@ -13,26 +13,23 @@ type ( // Repo represents a repository. Repo struct { - ID int64 `json:"id,omitempty"` - Owner string `json:"owner"` - Name string `json:"name"` - FullName string `json:"full_name"` - Avatar string `json:"avatar_url,omitempty"` - Link string `json:"link_url,omitempty"` - Kind string `json:"scm,omitempty"` - Clone string `json:"clone_url,omitempty"` - Branch string `json:"default_branch,omitempty"` - Timeout int64 `json:"timeout,omitempty"` - Visibility string `json:"visibility"` - IsPrivate bool `json:"private,omitempty"` - IsTrusted bool `json:"trusted"` - IsStarred bool `json:"starred,omitempty"` - IsGated bool `json:"gated"` - AllowPull bool `json:"allow_pr"` - AllowPush bool `json:"allow_push"` - AllowDeploy bool `json:"allow_deploys"` - AllowTag bool `json:"allow_tags"` - Config string `json:"config_file"` + ID int64 `json:"id,omitempty"` + Owner string `json:"owner"` + Name string `json:"name"` + FullName string `json:"full_name"` + Avatar string `json:"avatar_url,omitempty"` + Link string `json:"link_url,omitempty"` + Kind string `json:"scm,omitempty"` + Clone string `json:"clone_url,omitempty"` + Branch string `json:"default_branch,omitempty"` + Timeout int64 `json:"timeout,omitempty"` + Visibility string `json:"visibility"` + IsPrivate bool `json:"private,omitempty"` + IsTrusted bool `json:"trusted"` + IsStarred bool `json:"starred,omitempty"` + IsGated bool `json:"gated"` + AllowPull bool `json:"allow_pr"` + Config string `json:"config_file"` } // RepoPatch defines a repository patch request. @@ -43,9 +40,6 @@ type ( Timeout *int64 `json:"timeout,omitempty"` Visibility *string `json:"visibility"` AllowPull *bool `json:"allow_pr,omitempty"` - AllowPush *bool `json:"allow_push,omitempty"` - AllowDeploy *bool `json:"allow_deploy,omitempty"` - AllowTag *bool `json:"allow_tag,omitempty"` BuildCounter *int `json:"build_counter,omitempty"` } diff --git a/model/repo.go b/model/repo.go index 40a523931..96fca7246 100644 --- a/model/repo.go +++ b/model/repo.go @@ -30,31 +30,28 @@ type RepoLite struct { // // swagger:model repo type Repo struct { - ID int64 `json:"id,omitempty" meddler:"repo_id,pk"` - UserID int64 `json:"-" meddler:"repo_user_id"` - Owner string `json:"owner" meddler:"repo_owner"` - Name string `json:"name" meddler:"repo_name"` - FullName string `json:"full_name" meddler:"repo_full_name"` - Avatar string `json:"avatar_url,omitempty" meddler:"repo_avatar"` - Link string `json:"link_url,omitempty" meddler:"repo_link"` - Kind string `json:"scm,omitempty" meddler:"repo_scm"` - Clone string `json:"clone_url,omitempty" meddler:"repo_clone"` - Branch string `json:"default_branch,omitempty" meddler:"repo_branch"` - Timeout int64 `json:"timeout,omitempty" meddler:"repo_timeout"` - Visibility string `json:"visibility" meddler:"repo_visibility"` - IsPrivate bool `json:"private" meddler:"repo_private"` - IsTrusted bool `json:"trusted" meddler:"repo_trusted"` - IsStarred bool `json:"starred,omitempty" meddler:"-"` - IsGated bool `json:"gated" meddler:"repo_gated"` - IsActive bool `json:"active" meddler:"repo_active"` - AllowPull bool `json:"allow_pr" meddler:"repo_allow_pr"` - AllowPush bool `json:"allow_push" meddler:"repo_allow_push"` - AllowDeploy bool `json:"allow_deploys" meddler:"repo_allow_deploys"` - AllowTag bool `json:"allow_tags" meddler:"repo_allow_tags"` - Counter int `json:"last_build" meddler:"repo_counter"` - Config string `json:"config_file" meddler:"repo_config_path"` - Hash string `json:"-" meddler:"repo_hash"` - Perm *Perm `json:"-" meddler:"-"` + ID int64 `json:"id,omitempty" meddler:"repo_id,pk"` + UserID int64 `json:"-" meddler:"repo_user_id"` + Owner string `json:"owner" meddler:"repo_owner"` + Name string `json:"name" meddler:"repo_name"` + FullName string `json:"full_name" meddler:"repo_full_name"` + Avatar string `json:"avatar_url,omitempty" meddler:"repo_avatar"` + Link string `json:"link_url,omitempty" meddler:"repo_link"` + Kind string `json:"scm,omitempty" meddler:"repo_scm"` + Clone string `json:"clone_url,omitempty" meddler:"repo_clone"` + Branch string `json:"default_branch,omitempty" meddler:"repo_branch"` + Timeout int64 `json:"timeout,omitempty" meddler:"repo_timeout"` + Visibility string `json:"visibility" meddler:"repo_visibility"` + IsPrivate bool `json:"private" meddler:"repo_private"` + IsTrusted bool `json:"trusted" meddler:"repo_trusted"` + IsStarred bool `json:"starred,omitempty" meddler:"-"` + IsGated bool `json:"gated" meddler:"repo_gated"` + IsActive bool `json:"active" meddler:"repo_active"` + AllowPull bool `json:"allow_pr" meddler:"repo_allow_pr"` + Counter int `json:"last_build" meddler:"repo_counter"` + Config string `json:"config_file" meddler:"repo_config_path"` + Hash string `json:"-" meddler:"repo_hash"` + Perm *Perm `json:"-" meddler:"-"` } func (r *Repo) ResetVisibility() { @@ -101,8 +98,5 @@ type RepoPatch struct { Timeout *int64 `json:"timeout,omitempty"` Visibility *string `json:"visibility,omitempty"` AllowPull *bool `json:"allow_pr,omitempty"` - AllowPush *bool `json:"allow_push,omitempty"` - AllowDeploy *bool `json:"allow_deploy,omitempty"` - AllowTag *bool `json:"allow_tag,omitempty"` BuildCounter *int `json:"build_counter,omitempty"` } diff --git a/server/hook.go b/server/hook.go index 2bcdc324b..a3311b477 100644 --- a/server/hook.go +++ b/server/hook.go @@ -134,16 +134,9 @@ func PostHook(c *gin.Context) { c.Writer.WriteHeader(204) return } - var skipped = true - if (build.Event == model.EventPush && repo.AllowPush) || - (build.Event == model.EventPull && repo.AllowPull) || - (build.Event == model.EventDeploy && repo.AllowDeploy) || - (build.Event == model.EventTag && repo.AllowTag) { - skipped = false - } - if skipped { - logrus.Infof("ignoring hook. repo %s is disabled for %s events.", repo.FullName, build.Event) + if build.Event == model.EventPull && !repo.AllowPull { + logrus.Infof("ignoring hook. repo %s is disabled for pull requests.", repo.FullName) c.Writer.WriteHeader(204) return } diff --git a/server/repo.go b/server/repo.go index ed08c9c2f..e0e498ef5 100644 --- a/server/repo.go +++ b/server/repo.go @@ -42,19 +42,18 @@ func PostRepo(c *gin.Context) { repo.IsActive = true repo.UserID = user.ID - if !repo.AllowPush && !repo.AllowPull && !repo.AllowDeploy && !repo.AllowTag { - repo.AllowPush = true - repo.AllowPull = true - } + if repo.Visibility == "" { repo.Visibility = model.VisibilityPublic if repo.IsPrivate { repo.Visibility = model.VisibilityPrivate } } + if repo.Timeout == 0 { repo.Timeout = 60 // 1 hour default build time } + if repo.Hash == "" { repo.Hash = base32.StdEncoding.EncodeToString( securecookie.GenerateRandomKey(32), @@ -110,18 +109,9 @@ func PatchRepo(c *gin.Context) { return } - if in.AllowPush != nil { - repo.AllowPush = *in.AllowPush - } if in.AllowPull != nil { repo.AllowPull = *in.AllowPull } - if in.AllowDeploy != nil { - repo.AllowDeploy = *in.AllowDeploy - } - if in.AllowTag != nil { - repo.AllowTag = *in.AllowTag - } if in.IsGated != nil { repo.IsGated = *in.IsGated } diff --git a/server/swagger/files/swagger.yml b/server/swagger/files/swagger.yml index cf23907c3..efe21c2da 100644 --- a/server/swagger/files/swagger.yml +++ b/server/swagger/files/swagger.yml @@ -93,10 +93,7 @@ paths: "timeout": 60, "private": false, "trusted": false, - "allow_pr": true, - "allow_push": true, - "allow_deploys": false, - "allow_tags": false + "allow_pr": true } required: true tags: @@ -655,10 +652,7 @@ definitions: "timeout": 60, "private": false, "trusted": false, - "allow_pr": true, - "allow_push": true, - "allow_deploys": false, - "allow_tags": false + "allow_pr": true } properties: id: @@ -712,15 +706,6 @@ definitions: allow_pr: description: Whether pull requests should trigger a build. type: boolean - allow_push: - description: Whether push events should trigger a build. - type: boolean - allow_deploys: - description: Whether deployment events should trigger a build. - type: boolean - allow_tags: - description: Whether tags should trigger a build. - type: boolean Build: description: A build for a repository. diff --git a/store/datastore/ddl/mysql/ddl_gen.go b/store/datastore/ddl/mysql/ddl_gen.go index 0bcbe1b16..09e9bc31d 100644 --- a/store/datastore/ddl/mysql/ddl_gen.go +++ b/store/datastore/ddl/mysql/ddl_gen.go @@ -204,6 +204,10 @@ var migrations = []struct { name: "alter-table-drop-repo-fallback", stmt: alterTableDropRepoFallback, }, + { + name: "drop-allow-push-tags-deploys-columns", + stmt: dropAllowPushTagsDeploysColumns, + }, } // Migrate performs the database migration. If the migration fails @@ -757,3 +761,11 @@ UPDATE builds SET changed_files='[]' var alterTableDropRepoFallback = ` ALTER TABLE repos DROP COLUMN repo_fallback ` + +// +// 027_drop_allow_push_tags_deployments_columns.sql +// + +var dropAllowPushTagsDeploysColumns = ` +ALTER TABLE repos DROP COLUMN repo_allow_push, DROP COLUMN repo_allow_deploys, DROP COLUMN repo_allow_tags +` diff --git a/store/datastore/ddl/mysql/files/027_drop_allow_push_tags_deployments_columns.sql b/store/datastore/ddl/mysql/files/027_drop_allow_push_tags_deployments_columns.sql new file mode 100644 index 000000000..bae5a3b37 --- /dev/null +++ b/store/datastore/ddl/mysql/files/027_drop_allow_push_tags_deployments_columns.sql @@ -0,0 +1,2 @@ +-- name: drop-allow-push-tags-deploys-columns +ALTER TABLE repos DROP COLUMN repo_allow_push, DROP COLUMN repo_allow_deploys, DROP COLUMN repo_allow_tags diff --git a/store/datastore/ddl/postgres/ddl_gen.go b/store/datastore/ddl/postgres/ddl_gen.go index 67e01774c..29d65d636 100644 --- a/store/datastore/ddl/postgres/ddl_gen.go +++ b/store/datastore/ddl/postgres/ddl_gen.go @@ -204,6 +204,10 @@ var migrations = []struct { name: "alter-table-drop-repo-fallback", stmt: alterTableDropRepoFallback, }, + { + name: "drop-allow-push-tags-deploys-columns", + stmt: dropAllowPushTagsDeploysColumns, + }, } // Migrate performs the database migration. If the migration fails @@ -759,3 +763,11 @@ UPDATE builds SET changed_files='[]' var alterTableDropRepoFallback = ` ALTER TABLE repos DROP COLUMN repo_fallback ` + +// +// 027_drop_allow_push_tags_deployments_columns.sql +// + +var dropAllowPushTagsDeploysColumns = ` +ALTER TABLE repos DROP COLUMN repo_allow_push, DROP COLUMN repo_allow_deploys, DROP COLUMN repo_allow_tags +` diff --git a/store/datastore/ddl/postgres/files/027_drop_allow_push_tags_deployments_columns.sql b/store/datastore/ddl/postgres/files/027_drop_allow_push_tags_deployments_columns.sql new file mode 100644 index 000000000..bae5a3b37 --- /dev/null +++ b/store/datastore/ddl/postgres/files/027_drop_allow_push_tags_deployments_columns.sql @@ -0,0 +1,2 @@ +-- name: drop-allow-push-tags-deploys-columns +ALTER TABLE repos DROP COLUMN repo_allow_push, DROP COLUMN repo_allow_deploys, DROP COLUMN repo_allow_tags diff --git a/store/datastore/ddl/sqlite/ddl_gen.go b/store/datastore/ddl/sqlite/ddl_gen.go index 3fe4ce295..bf11780d5 100644 --- a/store/datastore/ddl/sqlite/ddl_gen.go +++ b/store/datastore/ddl/sqlite/ddl_gen.go @@ -208,6 +208,10 @@ var migrations = []struct { name: "alter-table-drop-repo-fallback", stmt: alterTableDropRepoFallback, }, + { + name: "drop-allow-push-tags-deploys-columns", + stmt: dropAllowPushTagsDeploysColumns, + }, } // Migrate performs the database migration. If the migration fails @@ -812,3 +816,57 @@ DROP TABLE repos; ALTER TABLE repos_new RENAME TO repos; COMMIT; ` + +// +// 027_drop_allow_push_tags_deployments_columns.sql +// + +var dropAllowPushTagsDeploysColumns = ` +BEGIN TRANSACTION; +CREATE TABLE repos_new ( + repo_id INTEGER PRIMARY KEY AUTOINCREMENT, + repo_user_id INTEGER, + repo_owner TEXT, + repo_name TEXT, + repo_full_name TEXT, + repo_avatar TEXT, + repo_link TEXT, + repo_clone TEXT, + repo_branch TEXT, + repo_timeout INTEGER, + repo_private BOOLEAN, + repo_trusted BOOLEAN, + repo_active BOOLEAN, + repo_allow_pr BOOLEAN, + repo_hash TEXT, + repo_scm TEXT, + repo_config_path TEXT, + repo_gated BOOLEAN, + repo_visibility TEXT, + repo_counter INTEGER, + UNIQUE(repo_full_name) +); +INSERT INTO repos_new SELECT repo_id +,repo_user_id +,repo_owner +,repo_name +,repo_full_name +,repo_avatar +,repo_link +,repo_clone +,repo_branch +,repo_timeout +,repo_private +,repo_trusted +,repo_active +,repo_allow_pr +,repo_hash +,repo_scm +,repo_config_path +,repo_gated +,repo_visibility +,repo_counter FROM repos; +DROP TABLE repos; +ALTER TABLE repos_new RENAME TO repos; +COMMIT; +` diff --git a/store/datastore/ddl/sqlite/files/027_drop_allow_push_tags_deployments_columns.sql b/store/datastore/ddl/sqlite/files/027_drop_allow_push_tags_deployments_columns.sql new file mode 100644 index 000000000..9ec03e71e --- /dev/null +++ b/store/datastore/ddl/sqlite/files/027_drop_allow_push_tags_deployments_columns.sql @@ -0,0 +1,48 @@ +-- name: drop-allow-push-tags-deploys-columns +BEGIN TRANSACTION; +CREATE TABLE repos_new ( + repo_id INTEGER PRIMARY KEY AUTOINCREMENT, + repo_user_id INTEGER, + repo_owner TEXT, + repo_name TEXT, + repo_full_name TEXT, + repo_avatar TEXT, + repo_link TEXT, + repo_clone TEXT, + repo_branch TEXT, + repo_timeout INTEGER, + repo_private BOOLEAN, + repo_trusted BOOLEAN, + repo_active BOOLEAN, + repo_allow_pr BOOLEAN, + repo_hash TEXT, + repo_scm TEXT, + repo_config_path TEXT, + repo_gated BOOLEAN, + repo_visibility TEXT, + repo_counter INTEGER, + UNIQUE(repo_full_name) +); +INSERT INTO repos_new SELECT repo_id +,repo_user_id +,repo_owner +,repo_name +,repo_full_name +,repo_avatar +,repo_link +,repo_clone +,repo_branch +,repo_timeout +,repo_private +,repo_trusted +,repo_active +,repo_allow_pr +,repo_hash +,repo_scm +,repo_config_path +,repo_gated +,repo_visibility +,repo_counter FROM repos; +DROP TABLE repos; +ALTER TABLE repos_new RENAME TO repos; +COMMIT; diff --git a/store/datastore/repos.go b/store/datastore/repos.go index 584f285f5..e69509b9c 100644 --- a/store/datastore/repos.go +++ b/store/datastore/repos.go @@ -84,9 +84,6 @@ func (db *datastore) RepoBatch(repos []*model.Repo) error { repo.IsTrusted, repo.IsActive, repo.AllowPull, - repo.AllowPush, - repo.AllowDeploy, - repo.AllowTag, repo.Hash, repo.Kind, repo.Config, diff --git a/store/datastore/sql/mysql/files/repos.sql b/store/datastore/sql/mysql/files/repos.sql index 5459fc6b5..2609a91ed 100644 --- a/store/datastore/sql/mysql/files/repos.sql +++ b/store/datastore/sql/mysql/files/repos.sql @@ -21,9 +21,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -51,16 +48,13 @@ INSERT IGNORE INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) +) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) -- name: repo-delete diff --git a/store/datastore/sql/mysql/sql_gen.go b/store/datastore/sql/mysql/sql_gen.go index 73990a460..be6b35442 100644 --- a/store/datastore/sql/mysql/sql_gen.go +++ b/store/datastore/sql/mysql/sql_gen.go @@ -439,9 +439,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -469,16 +466,13 @@ INSERT IGNORE INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) +) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ` var repoDelete = ` diff --git a/store/datastore/sql/postgres/files/repos.sql b/store/datastore/sql/postgres/files/repos.sql index 6c0eb1445..09199ed50 100644 --- a/store/datastore/sql/postgres/files/repos.sql +++ b/store/datastore/sql/postgres/files/repos.sql @@ -21,9 +21,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -51,16 +48,13 @@ INSERT INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22) +) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19) ON CONFLICT (repo_full_name) DO NOTHING -- name: repo-delete diff --git a/store/datastore/sql/postgres/sql_gen.go b/store/datastore/sql/postgres/sql_gen.go index 84eb1df9a..8a47f8145 100644 --- a/store/datastore/sql/postgres/sql_gen.go +++ b/store/datastore/sql/postgres/sql_gen.go @@ -442,9 +442,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -472,16 +469,13 @@ INSERT INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22) +) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19) ON CONFLICT (repo_full_name) DO NOTHING ` diff --git a/store/datastore/sql/sqlite/files/repos.sql b/store/datastore/sql/sqlite/files/repos.sql index 2aba7acf6..cf8db973a 100644 --- a/store/datastore/sql/sqlite/files/repos.sql +++ b/store/datastore/sql/sqlite/files/repos.sql @@ -21,9 +21,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -51,16 +48,13 @@ INSERT OR IGNORE INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) +) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) -- name: repo-delete diff --git a/store/datastore/sql/sqlite/sql_gen.go b/store/datastore/sql/sqlite/sql_gen.go index 08a2c1b43..d3d092ae7 100644 --- a/store/datastore/sql/sqlite/sql_gen.go +++ b/store/datastore/sql/sqlite/sql_gen.go @@ -439,9 +439,6 @@ SELECT ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path @@ -469,16 +466,13 @@ INSERT OR IGNORE INTO repos ( ,repo_trusted ,repo_active ,repo_allow_pr -,repo_allow_push -,repo_allow_deploys -,repo_allow_tags ,repo_hash ,repo_scm ,repo_config_path ,repo_gated ,repo_visibility ,repo_counter -) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) +) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ` var repoDelete = ` diff --git a/web/src/screens/repo/screens/settings/index.js b/web/src/screens/repo/screens/settings/index.js index 3d26aaa1a..cf30a9ebc 100644 --- a/web/src/screens/repo/screens/settings/index.js +++ b/web/src/screens/repo/screens/settings/index.js @@ -32,10 +32,7 @@ export default class Settings extends Component { constructor(props, context) { super(props, context); - this.handlePushChange = this.handlePushChange.bind(this); this.handlePullChange = this.handlePullChange.bind(this); - this.handleTagChange = this.handleTagChange.bind(this); - this.handleDeployChange = this.handleDeployChange.bind(this); this.handleTrustedChange = this.handleTrustedChange.bind(this); this.handleProtectedChange = this.handleProtectedChange.bind(this); this.handleVisibilityChange = this.handleVisibilityChange.bind(this); @@ -78,37 +75,13 @@ export default class Settings extends Component {

Repository Hooks

- - -
@@ -186,22 +159,10 @@ export default class Settings extends Component { ); } - handlePushChange(e) { - this.handleChange("allow_push", e.target.checked); - } - handlePullChange(e) { this.handleChange("allow_pr", e.target.checked); } - handleTagChange(e) { - this.handleChange("allow_tag", e.target.checked); - } - - handleDeployChange(e) { - this.handleChange("allow_deploy", e.target.checked); - } - handleTrustedChange(e) { this.handleChange("trusted", e.target.checked); }