Skip to content

Commit

Permalink
Update check-label-preliminary-update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
t-will-gillis authored Dec 29, 2023
1 parent d80e936 commit d18335e
Showing 1 changed file with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,39 @@ function obtainLabels(){
* @returns - A boolean which tells whether we are supposed to post a preliminary update based on the given issue checks
*/

function postComment(existingLabels){
//issue states that we are to post the comment if--> there is a role: back end/devOps tag...(continued on next comment)
if(existingLabels.includes("role: back end/devOps")){
return true
}
// function postComment(existingLabels){
// //issue states that we are to post the comment if--> there is a role: back end/devOps tag...(continued on next comment)
// if(existingLabels.includes("role: back end/devOps")){
// return true
// }

// // or if there is a role: front end tag
// else if(existingLabels.includes("role: front end")){
// return true
// }

// or if there is a role: front end tag
else if(existingLabels.includes("role: front end")){
return true
}
// //or if there is a role: design tag
// else if(existingLabels.includes("role: design")){
// return true
// }

//or if there is a role: design tag
else if(existingLabels.includes("role: design")){
return true
}
// //or if there is a role: user research
// else if(existingLabels.includes("role: user research")){
// return true
// }

//or if there is a role: user research
else if(existingLabels.includes("role: user research")){
return true
}
// //otherwise we return a false
// return false
// }

// Simplify postComment()
function postComment(existingLabels){
// Post the comment if there is a role: back end/devOps tag...(continued on next comment)
const labelsThatTriggerComments = ["role: back end/devOps", "role: front end", "role: design", "role: user research"]
console.log('in add-preliminary-comment.js')
console.log(existingLabels.some(value => labelsThatTriggerComments.includes(value)));
return existingLabels.some(value => labelsThatTriggerComments.includes(value));

//otherwise we return a false
return false
}

module.exports = main
module.exports = main

0 comments on commit d18335e

Please sign in to comment.