Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change closed GitHub issue color to purple, run [GitHubIssueDetail] #7374

Merged
merged 2 commits into from
Dec 18, 2021

Conversation

calebcartwright
Copy link
Member

Resolves #7372

We handle the coloring of non-open PRs directly within the service's render function, so this change will only apply to closed issues

@calebcartwright calebcartwright added the service-badge New or updated service badge label Dec 15, 2021
@shields-cd shields-cd temporarily deployed to shields-staging-pr-7374 December 15, 2021 01:43 Inactive
@shields-ci
Copy link

shields-ci commented Dec 15, 2021

Warnings
⚠️ This PR modified service code for github but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @calebcartwright!

Generated by 🚫 dangerJS against b6a8864

@@ -11,7 +11,7 @@ const documentation = `
`

function stateColor(s) {
return { open: '2cbe4e', closed: 'cb2431', merged: '6f42c1' }[s]
return { open: '2cbe4e', closed: '6f42c1', merged: '6f42c1' }[s]
Copy link
Member

@chris48s chris48s Dec 16, 2021

Choose a reason for hiding this comment

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

A closed (but not merged) PR is still presented as red. I think we need to split this into 2 functions

function issueStateColor(s) {
  return { open: '2cbe4e', closed: '6f42c1' }[s]
}

function pullRequestStateColor(s) {
    return { open: '2cbe4e', closed: 'cb2431', merged: '6f42c1' }[s]
}

Edit: Scratch that. I have just properly read the top post 🤦
Given this isn't used for PRs, do we need merged here?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, will update

@calebcartwright calebcartwright temporarily deployed to shields-staging-pr-7374 December 17, 2021 04:13 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHubIssueDetail Closed issues message color
4 participants