Repository navigation
feat: let members schedule commits as their organization, canceled if they left it by then - #1375
Merged
Merged
Conversation
… they left it by then
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Next layer of letting organizations post commits (#938): admins and members can now schedule a commit as their organization, the same way they post as it.
It sits behind the same
organization_commitsswitch as posting, which stays off: while it's off, the menu doesn't show, and the web and the API refuseauthorwhen scheduling too.Changes
scheduled_commits.author_id, new and nullable, a foreign key toprofilesthat doesn't cascade:/api/v1/scheduled-commits). It isn't shown to the organization's other members.user_id), and when GitHub no longer has the organization:DeleteOrganizationdeletes its scheduled commits and their images in code, before the profile.The column is indexed, so deleting a profile doesn't scan the table to check the key.
Scheduling:
CreateScheduledCommitRequestandCreateApiScheduledCommitRequestacceptauthorwith theOrganizationToPostAsrule from feat: let members post commits as their organization #1361, so members only, and only once the switch is on.Submission (
UpdateScheduledCommitSubmittedAt): the claim also requires the poster to still be a member of the organization, read when it's due. One that can no longer go out as its organization is canceled withDeleteScheduledCommit, as a ban cancels one. That applies to Commit now too.API:
ScheduledCommitResourceaddsauthor: the organization as aProfileResource, ornullwhen it goes out as the user. It is additive.Web: the composer keeps the Post as menu while scheduling, and the Scheduled page says As @laravel under the time.
KNOWLEDGE_BASE.mdsays organizations can schedule.Visual evidence
Local preview with seeded data, Chromium, the switch on. The viewer is
@local-dev, an admin of@laravel.Device verification
Viewport emulation in headless Chromium at 390×844 only, not a real phone. No horizontal overflow at either size.
Limitations
Decisions for organization commits (#938), made before building
Settled while building: switching posting as organizations off cancels what was scheduled as one, when it's due, rather than letting it out or keeping it waiting.
Summary by CodeRabbit