-
Notifications
You must be signed in to change notification settings - Fork 151
feat: Add reject reason #1295
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
base: main
Are you sure you want to change the base?
feat: Add reject reason #1295
Changes from all commits
f74342f
4dd20ed
6d87574
9ec6c16
3950cdc
3a4e599
cd86556
c734811
4ae8abd
4ee6b62
25a5ecf
28e25b0
fd67500
fcd54be
20c09ae
422cf99
8d28c4c
1c9c54d
9066df4
2f745d8
733c0bc
63b8d92
5f88752
2384a91
751e48f
50198de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,7 +63,7 @@ export const writeAudit = async (action: Action): Promise<void> => { | |
| await collection.updateOne({ id: data.id }, { $set: data }, options); | ||
| }; | ||
|
|
||
| export const authorise = async (id: string, attestation: any): Promise<{ message: string }> => { | ||
| export const authorise = async (id: string, rejection: any): Promise<{ message: string }> => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Would be great to have an |
||
| const action = await getPush(id); | ||
| if (!action) { | ||
| throw new Error(`push ${id} not found`); | ||
|
|
@@ -72,7 +72,7 @@ export const authorise = async (id: string, attestation: any): Promise<{ message | |
| action.authorised = true; | ||
| action.canceled = false; | ||
| action.rejected = false; | ||
| action.attestation = attestation; | ||
| action.rejection = rejection; | ||
| await writeAudit(action); | ||
| return { message: `authorised ${id}` }; | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,14 @@ export type Attestation = { | |
| questions: Question[]; | ||
| }; | ||
|
|
||
| export type Rejection = { | ||
| reviewer: { | ||
| username: string; | ||
| }; | ||
| timestamp: string | Date; | ||
| reason: string; | ||
| }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand a bit better now - perhaps we could have a |
||
|
|
||
| export type CommitContent = { | ||
| item: number; | ||
| type: number; | ||
|
|
||
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.
Might want to add the
Rejectiontype here!