-
Notifications
You must be signed in to change notification settings - Fork 16
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
Peer review: draft workflow, closing, invitation expirations #667
Conversation
remove draft/live flags in favor of a status field with under_review as a choice to indicate editable, private releases for peer reviews * missing tests and frontend work
redirect if there is an active review for a codebase, this shouldn't be necessary now additionally, set the "under review" release to automatically publish once a peer review is complete, if that codebase is marked live (releases have been published previously), this logic is somewhat arbitrary..
- allow a choice of converting a draft or making a new release when requesting from a draft - update peer review messaging/guidance to explain the new workflow - minor misc frontend fixes
slightly underestimated the amt of consideration this needed. Tests are being worked on and will need to be fairly thoroughly tested on staging as well |
squashme [no ci]
this led to the permissions being handled in the wrong place for certain requests - fix remaining test issues
shouldn't provide an option for creating a new release when requesting from a draft -- only convert to 'under review' |
last_published_on will never differ from first_published_at on a release unless it was unpublished and republished by admin. I believe we want to show last modified instead which indicates the last time anything in the release (metadata/contributors/files/etc.) was changed
keep platform and langs always but clear release notes and output url when we are creating a new draft - clean up create_release() and callers - fix false negative in request peer review test - fix draft/live flag -> status migration to avoid updating last_modified when reverting
when contributor name comes from a user rather than being explicitly set on the contributor, codebase.authors_list would ignore these - adjust wording on 'notify reviewers' button
…ivate alternatively we could just always publish once a model passes peer review
this seems all be working correctly now, just need to decide on what to do with a release after peer review completes. Current strategy is to automatically publish if the codebase has |
I think the strategy of keep it unpublished if unpublished, publish if there's already a live one is a reasonable one. It might be safest though to make all steps explicit, so we keep it unpublished until they explicitly publish it (e.g., the "congratulations, peer review passed" email might have a direct link to publish the model) |
Yeah good idea, that reminds me, I should add a link to edit the release in the email that gets sent to the submitter after changes are requested |
"review_complete" release status keeps the release unpublished but does not allowing modifying files - added a quick link to the publish modal which is given in the email after a review completes and on the detail page if the release is publishable + editable - added link to edit release in the revisions requested email
analogous to closing on github serves two purposes: 1. de-cluttering the dashboard, particularly in the case of legacy reviews on public releases that stall when changes are requested and a new release has to be made (resolves comses/planning#32) 2. allowing an author/requester to close inactive reviews since we now only allow one active review per codebase open at one time also includes some small refactors/bugfixes (resolves comses/planning#172)
Codebase.author_list was skipping authors even if they had an associated User because of order of operations / precedence refactor logic in the Contributor class to make `Contributor.has_name` return a truthy value if there's an associated User
- use f strings instead of format for simple interpolation - adjust peer review success email, we really will get it done by Q2 2024... really - remove dead imports
@@ -13,6 +13,7 @@ | |||
> | |||
<template #body> | |||
<div class="alert alert-danger mb-4" role="alert"> | |||
<!-- FIXME: is there a way to deduplicate this + reminders.jinja --> |
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.
easiest way would be mounting a vue component in place of the template. Feels silly doing so for static markup but may beat duplicating it
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.
I suspected that might be the only way forward since we regularly embed frontend things into the backend but not vice versa easily.. I think it's not a blocker for this PR moving forward. I'm OK with having two sets of guidance, let's make an issue out of it maybe for a student dev to take on
bbfc9d3
to
424cea6
Compare
- to remove duplication of content across ReviewModal and reminders.jinja could create a Vue component and mount it wherever reminders are needed but seems a bit much - fix test call site, should look into refactoring the fs module(s) at some point + add more test coverage
424cea6
to
2308e91
Compare
@@ -1014,17 +1085,33 @@ class CodebaseRelease(index.Indexed, ClusterableModel): | |||
* git repository in /repository/<codebase_identifier>/ | |||
""" | |||
|
|||
class Status(models.TextChoices): |
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.
good work unifying liveness, draft, and peer review status here
@@ -90,7 +91,7 @@ export const useReleaseEditorStore = defineStore("releaseEditor", () => { | |||
isInitialized.value = false; | |||
await fetchCodebaseRelease(identifier, versionNumber); | |||
await fetchMediaFiles(); | |||
if (!release.value.live) { | |||
if (release.value.canEditOriginals) { |
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.
👍
Major changes
under_review
releaseclosed
to peer reviews so they can be marked as inactive by the submitter or editorother bugfixes/refactors: