Repository navigation
Pin a commit to your profile from its More menu - #39
Merged
Merged
Conversation
Member
|
thanks! can you fix the conflicts? |
# Conflicts: # app/Devnull/Client.php # app/Devnull/CommitMenu.php # app/Devnull/Data/Commit.php # app/NativeComponents/Concerns/ShowsCommits.php # tests/Feature/Screens/CommitMenuTest.php
Contributor
Author
|
@simonhamp Done. The branch now merges the latest
The full suite passes except |
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.
Pin a commit to your profile from its More menu
The web lets you pin one of your commits to the top of your profile (dev-null-sh/dev-null.sh#90), and the app already shows a pinned commit there. This adds a way to pin and unpin from the app.
This depends on the dev-null.sh PR that adds
PUTandDELETE /api/v1/commits/{id}/pinto the signed API (dev-null-sh/dev-null.sh#829). Until it merges, Pin to profile gets a 404 and shows devnull's error.Changes
Client::pin()andClient::unpin()send a signed, bodilessPUTorDELETEtocommits/{id}/pinthroughreact(), asstar()does, and read the commit devnull answers with, includingis_pinned. A pin or unpin leaves your kept starred commits as they are.Tests
ClientTest: pin and unpin send a signed, bodilessPUT/DELETEto/api/v1/commits/c1/pinand readis_pinned.ClientCacheTest: pinning or unpinning a starred commit keeps your kept starred commits in their order.CommitMenuTest: More holds Pin to profile on your own published commit and not on a pending one; pinning from your profile puts the commit on top and changes the item to Unpin from profile; unpinning puts it back in the list; replies and other users' commits get no Pin item, andtogglePinsends nothing for them.php artisan test tests/Feature/Screens/CommitMenuTest.php tests/Feature/Devnull/ClientTest.php tests/Feature/Screens/LogTest.php: 7 failed without the change, 110 passed with it.LogTest's check that More leaves out bookmarks now expects the Pin item on your own commit. Pint is clean.