Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ rally:

# Which projects this repo will link to.
# To have it connect to any project, leave this value blank
# Optional - Leave it commented or set to `Any` to allow from any
# project in the workspace
projects:
- Sample Project
- devops-engineering
Expand Down
7 changes: 6 additions & 1 deletion lib/RallyValidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class RallyValidate {
if (config.rally.api_key) { // Rally API key, to override global default
rallyAPIKey = config.rally.api_key
}
if (!config.rally.projects || config.rally.projects.length < 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much improvment.. such wow

config.rally.projects = ['Any']
}
}

const rallyClient = rally({
Expand Down Expand Up @@ -853,6 +856,7 @@ class RallyValidate {

let status
let projectName
let validProject
let validState
let statusIcon
let isValid
Expand All @@ -865,7 +869,8 @@ class RallyValidate {
const artifact = queryResponse.Results[0]
status = artifact.ScheduleState
projectName = artifact.Project._refObjectName
isValid = (config.rally.states.includes(status) && config.rally.projects.includes(projectName))
validProject = (config.rally.projects.includes('Any') || config.rally.projects.includes(projectName))
isValid = (config.rally.states.includes(status) && validProject)
validState = isValid ? 'passed' : 'failed'
statusIcon = isValid ? ':heavy_check_mark:' : ':heavy_exclamation_mark:'
}
Expand Down
2 changes: 2 additions & 0 deletions rally.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ rally:

# Which projects this repo will link to.
# To have it connect to any project, leave this value blank
# Optional - Leave it commented or set to `Any` to allow from any
# project in the workspace
projects:
- Sample Project
- devops-engineering
Expand Down