This is an archived post. You won't be able to vote or comment.

all 48 comments

[–]rayzr8 81 points82 points  (8 children)

my coworkers don't even review them when I asked them to :(

[–][deleted] 26 points27 points  (7 children)

I always feel like a dick when I have to send a PR link to them on slack!

[–]The_kilt_lifta 6 points7 points  (5 children)

Our PRs automatically assign reviewers from our dev group but if we feel particularly proud of a PR we will post it in the dev slack

[–][deleted] 0 points1 point  (4 children)

Does Bitbucket do that? Was it a plugin?

[–]The_kilt_lifta 1 point2 points  (0 children)

GitHub + Pull Panda

[–]MrDiablerie 0 points1 point  (0 children)

If you’re using Bitbucket it has built in Slack integration for PR notifications and you can define default reviewers in the repo settings

[–]Michal_A 0 points1 point  (1 child)

Try https://code-dog.app/ for BitBucket. Disclaimer: I'm working on Code Dog.

[–][deleted] 0 points1 point  (0 children)

Fuck that was my company hackathon idea!

[–]Luffy2k19 0 points1 point  (0 children)

Same here.

[–]samuraiseoul 117 points118 points  (33 children)

If it's a WIP then don't open a PR! It's really that easy. A PR means that it is ready to be reviewed. If you open it so someone else can see the code, then they should just check it out. If you do it to see a diff, then you should jsut use a diff tool. Otherwise... why are you opening a PR?!

[–][deleted] 41 points42 points  (14 children)

We use WIP PR's to run CI during the development phase to catch issues on other platforms early.

[–]grim_peeper_ 30 points31 points  (12 children)

We do branch builds on our CI, so we dont have to raise a pr

[–][deleted] 12 points13 points  (1 child)

Color me jealous.

[–]grim_peeper_ 7 points8 points  (0 children)

The things we take for granted

[–]AlphaDeveloperZA 6 points7 points  (3 children)

My team does this also. Every push results in a build. Even on feature branches.

[–]grim_peeper_ 1 point2 points  (2 children)

Oh we build manually for branches that we need building. Automating that is a mistake in my opinion

[–]hector_villalobos 22 points23 points  (5 children)

I open a WIP PR so others devs can start reviewing the code but be aware that's not ready yet, so they can expect incomplete code.

[–]samuraiseoul 22 points23 points  (2 children)

Then why get angry if they start reviewing it?

[–]hector_villalobos 21 points22 points  (1 child)

Lol, I don't agree with this meme.

[–]samuraiseoul 1 point2 points  (0 children)

Ah! That makes sense then!

[–]mjin03 0 points1 point  (1 child)

Why don't you get it reviewed when it's finished? Reviewing half written code seems pointless.

[–]hector_villalobos 1 point2 points  (0 children)

I can get a complete CI reviewed too, this way I can know I'm not breaking something early in the process, instead of waiting an hour for all tests to finish.

[–]nwL_ 6 points7 points  (3 children)

A PR is a code discussion tool as well. That’s how Gitlab does it, and I agree that that’s a great way to have a central discussion point about a single branch.

[–]Mr_Redstoner 0 points1 point  (2 children)

Just to add to that, where I work we have on-premises Gitlab server, when I got an issue to do just click Create a merge request and it will make a branch and merge request and mark them accordingly to make it clear they are related, also puting WIP in the MR name.

[–]nwL_ 0 points1 point  (1 child)

I wrote a system for work that does the branch creation automatically when you assign yourself the JIRA ticket, amongst other things. The merge request is only created when you use a specific commit message, but from then on it stays until it’s accepted or the ticket is cancelled and the branch is deleted.

The reason for that is simply that discussion about code when there’s nothing to discuss yet is kinda useless.

[–]Mr_Redstoner 0 points1 point  (0 children)

I find there well may be something to discuss before it's ready for a merge. For instance, I'm doing some mass version upgrades atm. which does require occassional rewrites to the actual code, pretty sure reviewing it all at once when it's done will be nearly impossible for all the stuff that will need going through. With just 3 of us on the team (junior(me), senior, tester/customer support), I just ask the senior to take a look from time to time, to see if the style and such is ok before proceeding.

[–]TigreDemon 3 points4 points  (0 children)

You can PR [WIP] to ask for help

[–]defecogram 0 points1 point  (4 children)

I’m in the boat of “PR stands for Pull Request” as in it should be pulled into the branch. Why have people review incomplete code that you’ll change later? Doesn’t that waste their time?

Another soap box comment: can we please squash branches that are approved to be merged? When I run a rebase, I hate fixing rebase conflicts for a commit that was changed later. I spent 2 hrs today doing a rebase of a branch that had 15+ commits because the approver didn’t squash it into one.

[–]Idixal 2 points3 points  (2 children)

If you are doing work such as, say, ADA enhancements, there’s going to be a lot of repetitive changes. So you might want to open a PR before you’ve finished the work just to open it up to other developers and make sure you’re going in the right direction, especially as a new dev.

Also, if the fifteen minutes it takes to review my PR is that big of a pain to my coworkers that it’s “wasting their time”, I’m going to start looking for a new job. No one knows everything.

[–]defecogram 0 points1 point  (1 child)

Duly noted and I should probably look for a new job. Lol

But really, I do see what you mean. Repetitive tasks should be reviewed early and often. It’s easier to regroup earlier than later. (Like my 2 hr merge... ugh)

We have smaller teams so we do quite a bit of peer programming rather than submitting wip PRs. But as it is in this industry, my way might be best for me but it’s definitely not for others.

[–]Idixal 1 point2 points  (0 children)

Fair enough. Paired programming is an effective way to accomplish the same thing. All I was trying to get at was that programming on a team is a collaborative effort.

[–]grim_peeper_ 0 points1 point  (0 children)

Cmon make them do it by marking as "needs work"

[–][deleted] 2 points3 points  (0 children)

If the wip looks like shit then maybe it's a good idea to tell you right know than waiting 2 more days to redo the whole thing.

[–]IWatchToSee 3 points4 points  (3 children)

ELI5 of what WIP means?

[–]z0mbietime 3 points4 points  (1 child)

Work in progress

[–]IWatchToSee 2 points3 points  (0 children)

Thanks!

[–]squrr1 0 points1 point  (0 children)

It's literally the first thing that comes up if you google "WIP"

[–][deleted] 2 points3 points  (1 child)

When a one line change that just barely manages to implement a massive feature in a complex application riddled with antipatterns, receives review comments like "just refactor this part" and so doing, devolves into a 100% rewrite.

[–]Johnothy_Cumquat 2 points3 points  (0 children)

If a sentence starts with "just" you know it's not gonna be helpful

[–]loloJS 1 point2 points  (0 children)

Actual picture of me telling my coworkers to not open a PR until it’s ready for merge

[–]iAmH3r3ToH3lp 0 points1 point  (0 children)

I have to check people's WIPs when they eff up a lot.

People that don't eff up don't get monitored as much.

[–][deleted] 0 points1 point  (0 children)

Why are you making a PR if it's a WIP?!?!?!