Skip to content

[Issue #441] Add maintainer notes to patches - alternative solution #632

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
148 changes: 142 additions & 6 deletions docs/api/schemas/latest/patchwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,19 @@ paths:
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/Order'
- $ref: '#/components/parameters/Search'
- in: query
name: type
required: false
description: |
Filter comment type. Use 'notes' to show only maintainer notes,
'comments' to show only regular comments, or omit for default behavior
(which only shows regular comments).
schema:
title: 'Comment type'
type: string
enum:
- notes
- comments
responses:
'200':
description: 'List of comments'
Expand All @@ -339,6 +352,43 @@ paths:
$ref: '#/components/schemas/Error'
tags:
- comments
post:
summary: Create a maintainer note in the cover
description: |
Create a maintainer note in the cover
operationId: cover_maintainer_note_create
requestBody:
$ref: '#/components/requestBodies/MaintainerNote'
responses:
'201':
description: 'Created maintainer note'
headers:
Link:
$ref: '#/components/headers/Link'
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
'400':
description: 'Invalid request'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMaintainerNote'
'403':
description: 'Forbidden'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'Not found'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- comments
/api/covers/{cover_id}/comments/{comment_id}:
parameters:
- in: path
Expand All @@ -356,7 +406,7 @@ paths:
title: Comment ID
type: integer
get:
summary: Show a cover letter comment.
summary: Show a cover letter comment or maintainer note.
description: |
Retrieve a cover letter comment by its ID.
operationId: cover_comments_read
Expand All @@ -376,7 +426,7 @@ paths:
tags:
- comments
patch:
summary: Update a cover letter comment (partial).
summary: Update a cover letter comment or maintainer note (partial).
description:
Partially update an existing cover letter comment.
You must be a maintainer of the project that the cover letter comment belongs to.
Expand Down Expand Up @@ -725,6 +775,19 @@ paths:
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/Order'
- $ref: '#/components/parameters/Search'
- in: query
name: type
required: false
description: |
Filter comment type. Use 'notes' to show only maintainer notes,
'comments' to show only regular comments, or omit for default behavior
(which only shows regular comments).
schema:
title: 'Comment type'
type: string
enum:
- notes
- comments
responses:
'200':
description: 'List of comments'
Expand All @@ -745,6 +808,43 @@ paths:
$ref: '#/components/schemas/Error'
tags:
- comments
post:
summary: Create a maintainer note in the patch
description: |
Create a maintainer note in the patch
operationId: patch_maintainer_note_create
requestBody:
$ref: '#/components/requestBodies/MaintainerNote'
responses:
'201':
description: 'Created maintainer note'
headers:
Link:
$ref: '#/components/headers/Link'
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
'400':
description: 'Invalid request'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMaintainerNote'
'403':
description: 'Forbidden'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'Not found'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- comments
/api/patches/{patch_id}/comments/{comment_id}:
parameters:
- in: path
Expand All @@ -762,7 +862,7 @@ paths:
title: Comment ID
type: integer
get:
summary: Show a patch comment.
summary: Show a patch comment or maintainer note.
description: |
Retrieve a patch comment by its ID and the ID of the patch.
operationId: patch_comments_read
Expand All @@ -782,7 +882,7 @@ paths:
tags:
- comments
patch:
summary: Update a patch comment (partial).
summary: Update a patch comment or mantainer note (partial).
description:
Partially update an existing patch comment.
You must be a maintainer of the project that the patch comment belongs to.
Expand Down Expand Up @@ -1478,6 +1578,14 @@ components:
application/json:
schema:
$ref: '#/components/schemas/CommentUpdate'
MaintainerNote:
required: true
description: |
A maintainer note for patch or cover letters.
content:
application/json:
schema:
$ref: '#/components/schemas/MaintainerNote'
Patch:
required: true
description: |
Expand Down Expand Up @@ -1770,7 +1878,6 @@ components:
title: Message ID
type: string
readOnly: true
minLength: 1
maxLength: 255
list_archive_url:
title: List archive URL
Expand Down Expand Up @@ -1801,7 +1908,6 @@ components:
content:
title: Content
type: string
readOnly: true
minLength: 1
headers:
title: Headers
Expand Down Expand Up @@ -1831,6 +1937,20 @@ components:
type:
- 'null'
- 'boolean'
MaintainerNote:
type: object
title: Maintainer note
description: |
The fields to set on a maintainer note.
properties:
content:
title: Content
type: string
addressed:
title: Addressed
type:
- 'null'
- 'boolean'
CoverList:
type: object
title: Cover letters
Expand Down Expand Up @@ -3153,6 +3273,22 @@ components:
type: array
items:
type: string
ErrorMaintainerNote:
type: object
title: A maintainer note create or update error.
description: |
A mapping of field names to validation failures.
properties:
content:
title: Content
type: array
items:
type: string
addressed:
title: Addressed
type: array
items:
type: string
ErrorPatchUpdate:
type: object
title: A patch update error.
Expand Down
Loading
Loading