Skip to content

Commit

Permalink
add new Proposal Status enum case
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Apr 30, 2024
1 parent cde8a55 commit eafa456
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lambdas/GHHooks/EventHandler/Handlers/ReleaseMaker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct ReleaseMaker {
"""
))
).ok.body.json
logger.debug("Update a pull request with a release notice", metadata: [
logger.debug("Updated a pull request with a release notice", metadata: [
"before": "\(current)",
"after": "\(updated)"
])
Expand Down
5 changes: 5 additions & 0 deletions Sources/Penny/EvolutionChecker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ private extension Proposal.Status.State {
var color: DiscordColor {
switch self {
case .accepted: return .green
case .acceptedWithRevisions: return .green(scheme: .dark)
case .activeReview: return .orange
case .scheduledForReview: return .yellow
case .awaitingReview: return .yellow
Expand All @@ -469,6 +470,7 @@ private extension Proposal.Status.State {
var UIDescription: String? {
switch self {
case .accepted: return "Accepted"
case .acceptedWithRevisions: return "Accepted With Revisions"
case .activeReview: return "Active Review"
case .scheduledForReview: return "Scheduled For Review"
case .awaitingReview: return "Awaiting Review"
Expand Down Expand Up @@ -501,6 +503,7 @@ struct Proposal: Sendable, Codable {

enum State: RawRepresentable, Equatable, Sendable, Codable {
case accepted
case acceptedWithRevisions
case activeReview
case scheduledForReview
case awaitingReview
Expand All @@ -515,6 +518,7 @@ struct Proposal: Sendable, Codable {
var rawValue: String {
switch self {
case .accepted: return ".accepted"
case .acceptedWithRevisions: return ".acceptedWithRevisions"
case .activeReview: return ".activeReview"
case .scheduledForReview: return ".scheduledForReview"
case .awaitingReview: return ".awaitingReview"
Expand All @@ -531,6 +535,7 @@ struct Proposal: Sendable, Codable {
init? (rawValue: String) {
switch rawValue {
case ".accepted": self = .accepted
case ".acceptedWithRevisions": self = .acceptedWithRevisions
case ".activeReview": self = .activeReview
case ".scheduledForReview": self = .scheduledForReview
case ".awaitingReview": self = .awaitingReview
Expand Down

0 comments on commit eafa456

Please sign in to comment.