Add missing properties for GitPutParams schema
See: https://github.com/spring-projects/sts4/issues/65
This commit is contained in:
@@ -463,12 +463,14 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
AbstractType put = f.ybean("GitPutParams");
|
||||
addProp(put, "repository", t_ne_string).isPrimary(true);
|
||||
addProp(put, "rebase", t_boolean);
|
||||
addProp(put, "merge", t_boolean);
|
||||
addProp(put, "tag", t_ne_string);
|
||||
addProp(put, "only_tag", t_boolean);
|
||||
addProp(put, "tag_prefix", t_string);
|
||||
addProp(put, "force", t_boolean);
|
||||
addProp(put, "annotate", t_ne_string);
|
||||
|
||||
addProp(put, "notes", t_ne_string);
|
||||
put.require(Constraints.requireAtMostOneOf("rebase", "merge"));
|
||||
resourceTypes.def("git", source, get, put);
|
||||
}
|
||||
//docker-image:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. If pushing fails with non-fast-forward, continuously attempt to merge remote to local before pushing. Only one of `merge` or `rebase` can be provided, but not both.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. If this is set then notes will be added to HEAD to the `refs/notes/commits` ref. The value should be a path to a file containing the notes.
|
||||
@@ -1325,6 +1325,10 @@ public class ConcourseEditorTest {
|
||||
,
|
||||
"force: <*>"
|
||||
,
|
||||
"merge: <*>"
|
||||
,
|
||||
"notes: <*>"
|
||||
,
|
||||
"only_tag: <*>"
|
||||
,
|
||||
"rebase: <*>"
|
||||
@@ -1351,6 +1355,12 @@ public class ConcourseEditorTest {
|
||||
"force: false<*>",
|
||||
"force: true<*>"
|
||||
);
|
||||
assertContextualCompletions(context,
|
||||
"merge: <*>"
|
||||
, // ===>
|
||||
"merge: false<*>",
|
||||
"merge: true<*>"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void gitResourcePutParamsReconcile() throws Exception {
|
||||
@@ -1386,12 +1396,17 @@ public class ConcourseEditorTest {
|
||||
" repository: some-other-repo\n" +
|
||||
" rebase: do-rebase\n" +
|
||||
" only_tag: do-tag\n" +
|
||||
" force: force-it\n"
|
||||
" force: force-it\n" +
|
||||
" merge: merge-it\n" +
|
||||
" notes: whatever"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"rebase|Only one of [rebase, merge] should be defined",
|
||||
"do-rebase|'boolean'",
|
||||
"do-tag|'boolean'",
|
||||
"force-it|'boolean'"
|
||||
"force-it|'boolean'",
|
||||
"merge|Only one of [rebase, merge] should be defined",
|
||||
"merge-it|'boolean'"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1411,7 +1426,9 @@ public class ConcourseEditorTest {
|
||||
" only_tag: do-tag\n" +
|
||||
" tag_prefix: RELEASE\n" +
|
||||
" force: force-it\n" +
|
||||
" annotate: release-annotion\n"
|
||||
" annotate: release-annotion\n" +
|
||||
" merge: merge-it\n" +
|
||||
" notes: /path/to/notes"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("repository", "The path of the repository");
|
||||
@@ -1421,6 +1438,8 @@ public class ConcourseEditorTest {
|
||||
editor.assertHoverContains("tag_prefix", "prepended with this string");
|
||||
editor.assertHoverContains("force", "pushed regardless of the upstream state");
|
||||
editor.assertHoverContains("annotate", "path to a file containing the annotation message");
|
||||
editor.assertHoverContains("merge", "continuously attempt to merge remote");
|
||||
editor.assertHoverContains("notes", "path to a file containing the notes");
|
||||
}
|
||||
|
||||
@Test public void gitResourcePut_get_params_Hovers() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user