mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 07:47:44 -02:30
Merge pull request #13340 from gamuniz/change_wf_scmbranch_behavior
Change workflow create/edit to null scm_branch when not provided.
This commit is contained in:
@@ -24,6 +24,7 @@ function WorkflowJobTemplateAdd() {
|
|||||||
limit,
|
limit,
|
||||||
job_tags,
|
job_tags,
|
||||||
skip_tags,
|
skip_tags,
|
||||||
|
scm_branch,
|
||||||
...templatePayload
|
...templatePayload
|
||||||
} = values;
|
} = values;
|
||||||
templatePayload.inventory = inventory?.id;
|
templatePayload.inventory = inventory?.id;
|
||||||
@@ -32,6 +33,7 @@ function WorkflowJobTemplateAdd() {
|
|||||||
templatePayload.limit = limit === '' ? null : limit;
|
templatePayload.limit = limit === '' ? null : limit;
|
||||||
templatePayload.job_tags = job_tags === '' ? null : job_tags;
|
templatePayload.job_tags = job_tags === '' ? null : job_tags;
|
||||||
templatePayload.skip_tags = skip_tags === '' ? null : skip_tags;
|
templatePayload.skip_tags = skip_tags === '' ? null : skip_tags;
|
||||||
|
templatePayload.scm_branch = scm_branch === '' ? null : scm_branch;
|
||||||
const organizationId =
|
const organizationId =
|
||||||
organization?.id || inventory?.summary_fields?.organization.id;
|
organization?.id || inventory?.summary_fields?.organization.id;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ describe('<WorkflowJobTemplateAdd/>', () => {
|
|||||||
job_tags: null,
|
job_tags: null,
|
||||||
limit: null,
|
limit: null,
|
||||||
organization: undefined,
|
organization: undefined,
|
||||||
scm_branch: '',
|
scm_branch: null,
|
||||||
skip_tags: null,
|
skip_tags: null,
|
||||||
webhook_credential: undefined,
|
webhook_credential: undefined,
|
||||||
webhook_service: '',
|
webhook_service: '',
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ function WorkflowJobTemplateEdit({ template }) {
|
|||||||
limit,
|
limit,
|
||||||
job_tags,
|
job_tags,
|
||||||
skip_tags,
|
skip_tags,
|
||||||
|
scm_branch,
|
||||||
...templatePayload
|
...templatePayload
|
||||||
} = values;
|
} = values;
|
||||||
templatePayload.inventory = inventory?.id || null;
|
templatePayload.inventory = inventory?.id || null;
|
||||||
@@ -38,6 +39,7 @@ function WorkflowJobTemplateEdit({ template }) {
|
|||||||
templatePayload.limit = limit === '' ? null : limit;
|
templatePayload.limit = limit === '' ? null : limit;
|
||||||
templatePayload.job_tags = job_tags === '' ? null : job_tags;
|
templatePayload.job_tags = job_tags === '' ? null : job_tags;
|
||||||
templatePayload.skip_tags = skip_tags === '' ? null : skip_tags;
|
templatePayload.skip_tags = skip_tags === '' ? null : skip_tags;
|
||||||
|
templatePayload.scm_branch = scm_branch === '' ? null : scm_branch;
|
||||||
|
|
||||||
const formOrgId =
|
const formOrgId =
|
||||||
organization?.id || inventory?.summary_fields?.organization.id || null;
|
organization?.id || inventory?.summary_fields?.organization.id || null;
|
||||||
|
|||||||
Reference in New Issue
Block a user