Make fetch parameter in git-resource deprecated

See discussion here: 
 - https://github.com/concourse/git-resource/issues/118
 - https://www.pivotaltracker.com/story/show/150640930
This commit is contained in:
Kris De Volder
2017-08-29 09:25:41 -07:00
parent c30e6d558a
commit b1ae19d9c6
2 changed files with 6 additions and 5 deletions

View File

@@ -426,7 +426,7 @@ public class PipelineYmlSchema implements YamlSchema {
addProp(get, "depth", t_pos_integer);
addProp(get, "submodules", f.yany("GitSubmodules").addHints("all", "none"));
addProp(get, "disable_git_lfs", t_boolean);
addProp(get, "fetch", t_strings); //Warning: t_strings is just a guess. This property is undocumented. The example I've seen seem to use list of git branch/tag names.
addProp(get, "fetch", t_strings).isDeprecated(true); //Warning: t_strings is just a guess. This property is undocumented. The example I've seen seem to use list of git branch/tag names.
AbstractType put = f.ybean("GitPutParams");
addProp(put, "repository", t_ne_string).isPrimary(true);

View File

@@ -1162,11 +1162,11 @@ public class ConcourseEditorTest {
,
"disable_git_lfs: <*>"
,
"fetch:\n" +
" - <*>"
,
"submodules:\n"+
" <*>"
,
"fetch:\n" + // Deprecated, so not suggested
" - <*>"
);
assertContextualCompletions(context,
"disable_git_lfs: <*>"
@@ -3911,7 +3911,8 @@ public class ConcourseEditorTest {
" fetch: [master]\n" +
" submodules: none\n"
);
editor.assertProblems(/*NONE*/);
Diagnostic p = editor.assertProblems("fetch|Deprecated").get(0);
assertEquals(DiagnosticSeverity.Warning, p.getSeverity());
}
@Test public void bug_150337510() throws Exception {