StatusString returs a string representation of the merge status bits
(config *config.Config)
| 140 | |
| 141 | // StatusString returs a string representation of the merge status bits |
| 142 | func (pr *PullRequest) StatusString(config *config.Config) string { |
| 143 | icons := statusBitIcons(config) |
| 144 | statusString := "[" |
| 145 | |
| 146 | statusString += pr.MergeStatus.ChecksPass.String(config) |
| 147 | |
| 148 | if config.Repo.RequireApproval { |
| 149 | if pr.MergeStatus.ReviewApproved { |
| 150 | statusString += icons["checkmark"] |
| 151 | } else { |
| 152 | statusString += icons["crossmark"] |
| 153 | } |
| 154 | } else { |
| 155 | statusString += icons["empty"] |
| 156 | } |
| 157 | |
| 158 | if pr.MergeStatus.NoConflicts { |
| 159 | statusString += icons["checkmark"] |
| 160 | } else { |
| 161 | statusString += icons["crossmark"] |
| 162 | } |
| 163 | |
| 164 | if pr.MergeStatus.Stacked { |
| 165 | statusString += icons["checkmark"] |
| 166 | } else { |
| 167 | statusString += icons["crossmark"] |
| 168 | } |
| 169 | |
| 170 | statusString += "]" |
| 171 | return statusString |
| 172 | } |
| 173 | |
| 174 | func (pr *PullRequest) String(config *config.Config) string { |
| 175 | prStatus := pr.StatusString(config) |