Skip to content
Draft
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
7 changes: 7 additions & 0 deletions src/css/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ $color-dark-yellow: #DAA520;
display: inline;
}
}
&.actionRequired {
color: $color-bright-purple !important;
// Only show the alert icon if the item is overdue
.octicon-alert {
display: inline;
}
}
&.reviewing {
color: $color-neutral-light !important;
.issue-link {
Expand Down
42 changes: 41 additions & 1 deletion src/js/component/list-item/ListItemIssue.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ class ListItemIssue extends React.Component {
className += ' nonowner';
}

// See if it's waiting for an action from the engineer
if ((this.isWaitingForEngineerReview && !this.isContributorAssigned) || this.hasUnrepliedMentions) {
className += ' overdue';
}

return className + this.isPlanning + this.isWaitingOnCustomer + this.isHeld + this.isChallengeSent + this.isHelpWanted + this.isContributorAssigned;
}

Expand All @@ -54,8 +59,26 @@ class ListItemIssue extends React.Component {
this.isHelpWanted = _.some(this.props.issue.labels, {name: 'Help Wanted'}) ? ' help-wanted' : '';
this.isContributorAssigned = this.isExternal && !this.isHelpWanted ? ' contributor-assigned' : '';
this.isUnderReview = _.find(this.props.issue.labels, label => label.name.toLowerCase() === 'reviewing');
this.isWaitingForEngineerReview = this.props.issue.comments && _.some(this.props.issue.comments.nodes, comment => comment.body.includes('🎀👀🎀') || comment.body.includes('🎀 👀 🎀'));
this.issueHasOwner = this.props.issue.issueHasOwner;
this.isCurrentUserOwner = this.props.issue.currentUserIsOwner;
this.isDeployBlocker = _.findWhere(this.props.issue.labels, {name: 'DeployBlockerCash'}) ? <span className="label hourly">H</span> : null;
this.hasUnrepliedMentions = (() => {
if (!this.props.issue.comments) { return false; }
const comments = this.props.issue.comments.nodes;
const username = 'grgia'; // Replace with your GitHub username

const lastMentionIndex = _.findLastIndex(comments, comment => comment.body.includes(`@${username}`) && comment.author.login !== 'melvin-bot');

if (lastMentionIndex === -1) { return false; }

const hasRepliedSince = _.some(
comments.slice(lastMentionIndex + 1),
comment => comment.author.login === username,
);

return !hasRepliedSince;
})();
}

render() {
Expand Down Expand Up @@ -91,7 +114,24 @@ class ListItemIssue extends React.Component {
{this.isFeature}
{this.props.issue.title}
</a>

{this.isWaitingForEngineerReview && !this.isContributorAssigned && (
// eslint-disable-next-line jsx-a11y/accessible-emoji
<span>
{'\n 🎀👀🎀'}
</span>
)}
{this.hasUnrepliedMentions && (
// eslint-disable-next-line jsx-a11y/accessible-emoji
<span>
{'\n ⚠️💬⚠️'}
</span>
)}
{this.isDeployBlocker && (
// eslint-disable-next-line jsx-a11y/accessible-emoji
<span>
{'\n ❌❌❌'}
</span>
)}
{this.props.showAttendees && (
<div className="AvatarStack AvatarStack--right ml-2 flex-1 flex-shrink-0">
<div
Expand Down
11 changes: 11 additions & 0 deletions src/js/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,17 @@ function getIssues(assignee = 'none', labels = []) {
milestone {
id
}
comments(last: 15) {
nodes {
body
createdAt
author {
login
avatarUrl
}
}
totalCount
}
}
}
}
Expand Down
Loading