-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
feat: Handle scheduled request events in addons #5403
Conversation
Signed-off-by: andreas-unleash <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Signed-off-by: andreas-unleash <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A few minor suggestions that we could use to approve this, but nothing that needs to go in right now
@@ -140,6 +142,18 @@ const EVENT_MAP: Record<string, IEventData> = { | |||
action: '*{{user}}* sent to review change request {{changeRequest}}', | |||
path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', | |||
}, | |||
[CHANGE_REQUEST_SCHEDULED]: { | |||
action: '*{{user}}* scheduled change request {{changeRequest}} in project *{{event.project}}*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add when it was scheduled for? Something like this?
action: '*{{user}}* scheduled change request {{changeRequest}} in project *{{event.project}}*', | |
action: '*{{user}}* scheduled change request {{changeRequest}} to be applied at {{time}} in project *{{event.project}}*', |
path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', | ||
}, | ||
[CHANGE_REQUEST_SCHEDULED_APPLICATION_SUCCESS]: { | ||
action: '*{{user}}* successfully applied scheduled change request {{changeRequest}} in project *{{event.project}}*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is the user
in this case? The same as the one that's usually used for CR applications?
And if we're changing the wording of the failed event, we could also change this one a bit:
action: '*{{user}}* successfully applied scheduled change request {{changeRequest}} in project *{{event.project}}*', | |
action: 'Successfully applied the scheduled change request {{changeRequest}} by *{{user}}* in project *{{project}}*.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the 'applier'.
path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', | ||
}, | ||
[CHANGE_REQUEST_SENT_TO_REVIEW]: { | ||
action: '*{{user}}* failed to apply scheduled change request {{changeRequest}} in project *{{event.project}}*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is an urgent event, maybe we should put thefailed
bit first? Not very important, just a suggestion.
action: '*{{user}}* failed to apply scheduled change request {{changeRequest}} in project *{{event.project}}*', | |
action: '*Failed* to apply the scheduled change request {{changeRequest}} by *{{user}}* in project *{{project}}*.', |
Signed-off-by: andreas-unleash <[email protected]>
Signed-off-by: andreas-unleash <[email protected]>
3 events handled:
Closes # 1-1555
Note: SCHEDULED_CHANGE_REQUEST_EXECUTED will be removed in follow up PR not to break current enterprise build