Skip to content

Commit

Permalink
feat(action/GitClone): set default value from git.url to empty (#3178)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Aug 10, 2018
1 parent 8cdbd0a commit e8d3630
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions engine/sql/120_git_clone.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
-- +migrate Up

INSERT into action_parameter (action_id, name, description, type, value, advanced) values((select id from action where name = 'GitClone'), 'depth', 'gitClone use a depth of 50 by default. You can remove --depth with the value ''false''', 'string', '', true);
INSERT into action_parameter (action_id, name, description, type, value, advanced) values((select id from action where name = 'GitClone'), 'submodules', 'gitClone clones submodules by default, you can set ''false'' to avoid this', 'boolean', 'true', true);
INSERT into action_parameter (action_id, name, description, type, value, advanced) values((select id from action where name = 'GitClone' and type = 'Builtin'), 'depth', 'gitClone use a depth of 50 by default. You can remove --depth with the value ''false''', 'string', '', true);
INSERT into action_parameter (action_id, name, description, type, value, advanced) values((select id from action where name = 'GitClone' and type = 'Builtin'), 'submodules', 'gitClone clones submodules by default, you can set ''false'' to avoid this', 'boolean', 'true', true);

UPDATE action_parameter set value = '' where (name='url' or name = 'privateKey') and action_id=(select id from action where name = 'GitClone' and type = 'Builtin');

-- +migrate Down

DELETE from action_parameter where name = 'depth' and action_id = (select id from action where name = 'GitClone');
DELETE from action_parameter where name = 'submodules' and action_id = (select id from action where name = 'GitClone');
DELETE from action_parameter where name = 'depth' and action_id = (select id from action where name = 'GitClone' and type = 'Builtin');
DELETE from action_parameter where name = 'submodules' and action_id = (select id from action where name = 'GitClone' and type = 'Builtin');

UPDATE action_parameter set value = '{{.git.url}}' where name='url' and action_id=(select id from action where name = 'GitClone' and type = 'Builtin');

0 comments on commit e8d3630

Please sign in to comment.