Merge pull request #330 from omendrapandey/branch-issue#235-issuw-with-task-validation

fix: PR with TA, TC, TF, or DS ID always fails
This commit is contained in:
Jared Murrell 2021-10-07 06:35:33 -04:00 коммит произвёл GitHub
Родитель fbf7f94517 68e3294f04
Коммит 13bc2ff56c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -883,7 +883,7 @@ class RallyValidate {
scope: { scope: {
workspace: '/workspace/' + config.rally.workspace workspace: '/workspace/' + config.rally.workspace
}, },
fetch: ['FormattedID', 'Name', 'Description', 'ScheduleState', 'Project', 'Connections'], fetch: ['FormattedID', 'Name', 'Description', 'ScheduleState', 'State', 'Project', 'Connections'],
query: queryUtils.where('FormattedID', '=', githubArtifact.number), query: queryUtils.where('FormattedID', '=', githubArtifact.number),
requestOptions: {} requestOptions: {}
}) })
@ -901,7 +901,7 @@ class RallyValidate {
statusIcon = ':heavy_exclamation_mark:' statusIcon = ':heavy_exclamation_mark:'
} else { } else {
const artifact = queryResponse.Results[0] const artifact = queryResponse.Results[0]
status = artifact.ScheduleState status = artifact.ScheduleState ? artifact.ScheduleState : artifact.State
projectName = artifact.Project._refObjectName projectName = artifact.Project._refObjectName
validProject = (config.rally.projects.includes('Any') || config.rally.projects.includes(projectName)) validProject = (config.rally.projects.includes('Any') || config.rally.projects.includes(projectName))
isValid = (config.rally.states.includes(status) && validProject) isValid = (config.rally.states.includes(status) && validProject)