Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
fix: add information for project triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackarySantana committed Jan 11, 2024
1 parent 5cec588 commit 9f85816
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/constants/externalResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const versionControlDocumentationUrl = `${projectDistroSettingsDocumentat

export const patchAliasesDocumentationUrl = `${projectDistroSettingsDocumentationUrl}#patch-aliases`;

export const projectTriggersDocumentationUrl = `${projectDistroSettingsDocumentationUrl}#project-triggers`;

export const pullRequestAliasesDocumentationUrl = `${projectDistroSettingsDocumentationUrl}#pr-aliases`;

export const commitQueueAliasesDocumentationUrl = `${projectDistroSettingsDocumentationUrl}#commit-queue-aliases`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { GetFormSchema } from "components/SpruceForm";
import widgets from "components/SpruceForm/Widgets";
import { StyledLink } from "components/styles";
import { projectTriggersDocumentationUrl } from "constants/externalResources";
import { TaskStatus } from "types/task";
import { ProjectTriggerLevel } from "types/triggers";
import { form, ProjectType } from "../utils";
Expand Down Expand Up @@ -125,16 +127,22 @@ export const getFormSchema = (
"ui:displayTitle": "New Project Trigger",
"ui:label": false,
project: {
"ui:description": "The upstream project.",
"ui:data-cy": "project-input",
},
configFile: {
"ui:description":
"The path to the downstream project's config file. This may be the same as the main project configuration file but does not have to be.",
"ui:data-cy": "config-file-input",
"ui:placeholder": ".evergreen.yml",
},
level: {
"ui:description": LevelDescription,
"ui:allowDeselect": false,
},
status: {
"ui:description":
"Only applicable to build and task level triggers. Specify which status of the upstream build or task should trigger a downstream version.",
"ui:allowDeselect": false,
},
dateCutoff: {
Expand Down Expand Up @@ -175,3 +183,13 @@ export const getFormSchema = (
},
},
});

const LevelDescription = (
<>
Accepted values are task, build, and push. Task and build levels will
trigger based on the completion of either a task or a build in the upstream
project. View the{" "}
<StyledLink href={projectTriggersDocumentationUrl}>docs</StyledLink> for
more info.
</>
);

0 comments on commit 9f85816

Please sign in to comment.