86
How to close an issue Vida Engineering

How to close an issue

Embed Size (px)

Citation preview

Page 1: How to close an issue

How to close an issue

Vida Engineering

Page 2: How to close an issue

product-manager commented 5 minutes ago

When a user scrolls to the top of their feed on a given team, the app should automatically load the previous set of messages. This will require the server to support pagination on the MessageResource, and for all the clients to support retrieving the next page of messages when scrolling to the top of a feed.

Users should be able to load older messages #1000

product-manager opened this issue 5 minutes ago • 0 comments

webserver

Open

Page 3: How to close an issue

1. Break out large tickets into small tasks

Page 4: How to close an issue

engineer commented 2 minutes ago

Re #1000

Need to be able to call /api/v3/message/?before=2016-01-28 for example. The response should have a “next” link.

Support pagination in MessageResource #1001

engineer opened this issue 2 minutes ago • 0 comments

webserver

link to another webserver issue

Open

Page 5: How to close an issue

engineer commented 6 minutes ago

Re vidahealth/webserver#1000

The messages API endpoint returns a “next” link. Retrieve the contents of that link when the user scrolls to the top of a feed.

Get “next” page of messages when at top of page #300

engineer opened this issue 6 minutes ago • 0 comments

via_ios

link to an issue in another repo

Open

Page 6: How to close an issue

This was referenced 7 minutes ago

Support pagination in MessageResource #1001Get “next” page of messages when at top of page via_ios#300

Open

Open

Page 7: How to close an issue

This was referenced 7 minutes ago

Support pagination in MessageResource #1001Get “next” page of messages when at top of page via_ios#300

Open

Open

use references to link related tickets together!

Page 8: How to close an issue

This was referenced 7 minutes ago

Support pagination in MessageResource #1001Get “next” page of messages when at top of page via_ios#300

Open

Open

https://help.github.com/articles/autolinked-references-and-urls/#issues-and-pull-requests

use references to link related tickets together!

Page 9: How to close an issue

2. Create a feature branch

Page 10: How to close an issue

$

Page 11: How to close an issue

$ cd via_ios

Page 12: How to close an issue

$ cd via_ios$ git pull

Page 13: How to close an issue

$ cd via_ios$ git pull

Be sure to update your master before branching. You don’t want to build on top of old code.

Page 14: How to close an issue

$ cd via_ios$ git pull$ git checkout -b 300-load-more-messages

Page 15: How to close an issue

$ cd via_ios$ git pull$ git checkout -b 300-load-more-messages

Common practice is to use the ticket number in the branch name.

Page 16: How to close an issue

3. Write some code

Page 17: How to close an issue
Page 18: How to close an issue

+// Is this the right method?!+- (void)didScrollToYPosition:(CGFloat)yPosition+{+ // NOPE! Didn't work!+}

Page 19: How to close an issue

+// Is this the right method?!+//- (void)didScrollToYPosition:(CGFloat)yPosition+//{+// // NOPE! Didn't work!+//}

Page 20: How to close an issue

+// Is this the right method?!+//- (void)didScrollToYPosition:(CGFloat)yPosition+//{+// // NOPE! Didn't work!+//}

- (void)existingMethod {-#warning TODO load older messages+ // new code+// misaligned+// typos - ned fixng // existing code

Page 21: How to close an issue

+// Is this the right method?!+//- (void)didScrollToYPosition:(CGFloat)yPosition+//{+// // NOPE! Didn't work!+//}

- (void)existingMethod {-#warning TODO load older messages+ // new code+// misaligned+// typos - ned fixng // existing code

Remove unneeded code/comments

Page 22: How to close an issue

- (void)existingMethod {-#warning TODO load older messages+ // new code+// misaligned+// typos - ned fixng // existing code

Page 23: How to close an issue

- (void)existingMethod {-#warning TODO load older messages+ // new code+// misaligned+// typos - ned fixng // existing code

Fix any typos. Check alignment. Run any

linters/auto-formatters, and generally check for code

cleanliness.

Page 24: How to close an issue

- (void)existingMethod {-#warning TODO load older messages+ // new code+// misaligned+// typos - ned fixng // existing code

Fix any typos. Check alignment. Run any

linters/auto-formatters, and generally check for code

cleanliness.

The more of this you do ahead of time, the less

time a reviewer has to look out for small issues.

Page 25: How to close an issue

- (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

Page 26: How to close an issue

4. Publish your code

Page 27: How to close an issue

$

Page 28: How to close an issue

$ git diff

Check the final diff one last time. A clean commit is a reviewable commit!

Page 29: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

Page 30: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .

Page 31: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"

Page 32: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"

A commit message is an art-

form. Don’t rush it!

Page 33: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit

Page 34: How to close an issue

Fix #300: load more messages at top of feed, calls out to new server endpoint.

Page 35: How to close an issue

Fix #300: load more messages at top of feed, calls out to new server endpoint.

Call out what ticket you’re c

losing. If

there are multiple commits n

eeded to

close the ticket, add this on

the last of

those commits.

Page 36: How to close an issue

Fix #300: load more messages at top of feed, calls out to new server endpoint.

Keep the first line concise. Can’t fit the gist of your change in one line? Maybe your commit is too large!

Page 37: How to close an issue

Fix #300: load more messages at top of feedCalls out to new server endpoint.

Page 38: How to close an issue

Fix #300: load more messages at top of feed

Calls out to new server endpoint. It turned out that there was already an existing method that tracked when the user scrolled to the top of the feed, and I was able to hook into that.

Depends on vidahealth/webserver#1001.

Page 39: How to close an issue

Fix #300: load more messages at top of feed

Calls out to new server endpoint. It turned out that there was alreadyan existing method that tracked when the user scrolled to the top of thefeed, and I was able to hook into that.

Depends on vidahealth/webserver#1001.

Page 40: How to close an issue

Fix #300: load more messages at top of feed

Calls out to new server endpoint. It turned out that there was alreadyan existing method that tracked when the user scrolled to the top of thefeed, and I was able to hook into that.

Depends on vidahealth/webserver#1001.Explain what your change is and why you implemented it the way you did. Leave to the diff to explain how.

Page 42: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit$

Page 43: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit$

This is a good time to rebase your

branch. Did you break up your changes

into easily-digestible chunks?

Page 44: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit$

This is a good time to rebase your

branch. Did you break up your changes

into easily-digestible chunks?

“git rebase -i” is your friend.

Page 45: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit$ git push -u origin 300-load-more-messages

Page 46: How to close an issue

$ git diff - (void)existingMethod {-#warning TODO load older messages+ // new code+ // misaligned+ // typos - need fixing // existing code

$ git add .$ git commit -m "message"$ git commit$ git push -u origin 300-load-more-messages

If you use “-u” the first time, you won’t have to specify the remote and branch name next time.

Page 47: How to close an issue

5. Create a pull request

Page 48: How to close an issue

300-load-more-messages (less than a minute ago)

Your recently pushed branches:

Page 49: How to close an issue

engineer commented 6 minutes ago

Load more messages at top of feed #301

Open engineer wants to merge 1 commit into master from 300-load-more-messages

Page 50: How to close an issue

engineer commented 6 minutes ago

Fixes #300.

Load more messages at top of feed #301

Open engineer wants to merge 1 commit into master from 300-load-more-messages

Your PR might have multiple

commits, so it’s good to call out

the issue being fixed at the

beginning of your description.

Page 51: How to close an issue

engineer commented 6 minutes ago

Fixes #300. Requires running against the server code in vidahealth/webserver#1002.

I tested this by creating a few pages worth of messages for my test user, then scrolling to the top of the feed again and again.

Load more messages at top of feed #301

Open engineer wants to merge 1 commit into master from 300-load-more-messages

Provide context for your reviewer, as well as demonstrate you did the legwork of verifying your own change.

Page 52: How to close an issue

engineer commented 6 minutes ago

Fixes #300. Requires running against the server code in vidahealth/webserver#1002.

I tested this by creating a few pages worth of messages for my test user, then scrolling to the top of the feed again and again.

@other-dev: Can you take a look?

Load more messages at top of feed #301

Open engineer wants to merge 1 commit into master from 300-load-more-messages

other-dev was assigned by engineer 5 minutes ago

Page 53: How to close an issue

engineer commented 6 minutes ago

Fixes #300. Requires running against the server code in vidahealth/webserver#1002.

I tested this by creating a few pages worth of messages for my test user, then scrolling to the top of the feed again and again.

@other-dev: Can you take a look?

Load more messages at top of feed #301

Open engineer wants to merge 1 commit into master from 300-load-more-messages

other-dev was assigned by engineer 5 minutes ago

Identify a partner to work with

you on this PR.

Use @mentions and assignment

to make it clear who it is.

Page 54: How to close an issue

continuous-integration/travis-ci/pr — The Travis CI build could not complete... Details

Page 55: How to close an issue

continuous-integration/travis-ci/pr — The Travis CI build could not complete... Details

Click here, figure out the problem and fix it. If it’s not obvious or straightforward to fix, leave a comment saying so.

Page 56: How to close an issue

continuous-integration/travis-ci/pr — The Travis CI build passed Details

Page 57: How to close an issue

If all the discussion can move to a PR, close the ticket so the discussion isn’t split into two.

engineer commented 6 minutes ago

Closing in favor of #301.

Get “next” page of messages when at top of page #300

engineer opened this issue 2 days ago • 4 commentsClosed

Page 58: How to close an issue

6. Address feedback

Page 59: How to close an issue

other-dev added a note 20 minutes ago

@engineer: Shouldn’t we guard against an infinite re-request loop if the load more request fails?

other-dev commented on the diff 20 minutes ago

+ // top of screen, load older messages

+ [VASynchronizer loadMessagesWithCompletion:nil];

Via/VAFeedViewController.m View full changes

523

524

Page 60: How to close an issue

other-dev added a note 20 minutes ago

@engineer: Shouldn’t we guard against an infinite re-request loop if the load more request fails?

engineer added a note 10 minutes ago

There’s no need. This method is only called once, when the scrolling is complete, so a failed request won’t re-trigger it.

other-dev commented on the diff 20 minutes ago

+ // top of screen, load older messages

+ [VASynchronizer loadMessagesWithCompletion:nil];

Via/VAFeedViewController.m View full changes

523

524

Page 61: How to close an issue

other-dev added a note 20 minutes ago

@engineer: Shouldn’t we guard against an infinite re-request loop if the load more request fails?

engineer added a note 10 minutes ago

There’s no need. This method is only called once, when the scrolling is complete, so a failed request won’t re-trigger it.

other-dev commented on the diff 20 minutes ago

+ // top of screen, load older messages

+ [VASynchronizer loadMessagesWithCompletion:nil];

Via/VAFeedViewController.m View full changes

523

524

If the reviewer took the time to comment on your code, take the time to acknowledge it, even if you aren’t changing anything.

Page 62: How to close an issue

It’s your code.

Page 63: How to close an issue

It’s your code.Defend it.

Page 64: How to close an issue

other-dev added a note 18 minutes ago

@engineer: I’m a little confused on this. Is it always going to be a load more call? What about the initial call to get messages?

other-dev commented on the diff 18 minutes ago

+- (void)loadMessagesWithCompletion:(void (^)())cb

+ BOOL isLoadMore = YES;

Via/VAFeedViewController.m View full changes

147

148

Page 65: How to close an issue

other-dev added a note 18 minutes ago

@engineer: I’m a little confused on this. Is it always going to be a load more call? What about the initial call to get messages?

engineer added a note 9 minutes ago

Great point! That one is a separate method, so let me rename this to loadMoreMessagesWithCompletion:.

other-dev commented on the diff 18 minutes ago

+- (void)loadMessagesWithCompletion:(void (^)())cb

+ BOOL isLoadMore = YES;

Via/VAFeedViewController.m View full changes

147

148

Page 66: How to close an issue

It’s your code.Defend it.

Page 67: How to close an issue

It’s your code.Defend it.

Take feedback graciously.

Page 68: How to close an issue

$ git diff-- (void)loadMessagesWithCompletion:(void (^)())cb

+- (void)loadMoreMessagesWithCompletion:(void (^)())cb

Page 69: How to close an issue

$ git diff-- (void)loadMessagesWithCompletion:(void (^)())cb

+- (void)loadMoreMessagesWithCompletion:(void (^)())cb

Add new commits. Don’t rebase onto publicly-

accessible commits.

Page 70: How to close an issue

$ git diff-- (void)loadMessagesWithCompletion:(void (^)())cb

+- (void)loadMoreMessagesWithCompletion:(void (^)())cb

$ git add .

$ git commit

$ git push

Page 71: How to close an issue

$ git diff-- (void)loadMessagesWithCompletion:(void (^)())cb

+- (void)loadMoreMessagesWithCompletion:(void (^)())cb

$ git add .

$ git commit

$ git push

You used “-u” the first time you pushed, didn’t you?

Page 72: How to close an issue

engineer added some commits 3 minutes ago

Fix travis build

Address review comments

Page 73: How to close an issue
Page 74: How to close an issue

engineer added some commits 3 minutes ago

Fix travis build

Address review comments

Page 75: How to close an issue

engineer added some commits 3 minutes ago

Rename load more messages method

Update feed scrolling test for load more

Use descriptive commit messages

that make sense in isolation,

since they appear in “git log”

without the context of the PR.

Page 76: How to close an issue

engineer commented 4 minutes ago

@other-dev: Thanks for the feedback. I updated the PR, can you take another look please?

Page 77: How to close an issue

It’s your code.Defend it.

Take feedback graciously.

Page 78: How to close an issue

It’s your code.Defend it.

Take feedback graciously.Engage in the review process.

Page 79: How to close an issue

7. Merge it to master

Page 80: How to close an issue

other-dev commented 12 minutes ago

@engineer: LGTM. it!

Page 81: How to close an issue
Page 82: How to close an issue
Page 83: How to close an issue

engineer deleted the 300-load-more-messages branch 5 minutes ago

Page 84: How to close an issue

This was referenced 3 days ago

Support pagination in MessageResource #1001Get “next” page of messages when at top of page via_ios#300

Closed

Closed

Get “next” page of messages when at top of page android#702 Closed

Page 85: How to close an issue

Users should be able to load older messages #1000

product-manager opened this issue 4 days ago • 4 commentsClosed

engineer commented 4 minutes ago

All parts (server + both clients) are finished. This feature is complete.

Page 86: How to close an issue

Go ahead and clean up any other related issues that weren’t linked from the PR. Example: once both the Android and iOS portions are finished, close the master webserver ticket.

Users should be able to load older messages #1000

product-manager opened this issue 4 days ago • 4 commentsClosed

engineer commented 4 minutes ago

All parts (server + both clients) are finished. This feature is complete.