Skip to content

Commit 0b3b1f5

Browse files
authored
Merge pull request #852 from yegor256/851
can't merge, help me
2 parents 297776b + 81aa6ab commit 0b3b1f5

File tree

3 files changed

+143
-24
lines changed

3 files changed

+143
-24
lines changed

Gemfile.lock

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GEM
2121
fiber-local (~> 1.1)
2222
json
2323
csv (3.3.5)
24-
date (3.4.1)
24+
date (3.5.0)
2525
em-websocket (0.5.3)
2626
eventmachine (>= 0.12.9)
2727
http_parser.rb (~> 0)
@@ -36,8 +36,8 @@ GEM
3636
logger
3737
faraday-multipart (1.1.1)
3838
multipart-post (~> 2.0)
39-
faraday-net_http (3.4.1)
40-
net-http (>= 0.5.0)
39+
faraday-net_http (3.4.2)
40+
net-http (~> 0.5)
4141
fastimage (2.4.0)
4242
ffi (1.17.2-aarch64-linux-gnu)
4343
ffi (1.17.2-arm-linux-gnu)
@@ -51,25 +51,25 @@ GEM
5151
fiber-storage
5252
fiber-storage (1.0.1)
5353
forwardable-extended (2.6.0)
54-
google-protobuf (4.32.1)
54+
google-protobuf (4.33.0)
5555
bigdecimal
5656
rake (>= 13)
57-
google-protobuf (4.32.1-aarch64-linux-gnu)
57+
google-protobuf (4.33.0-aarch64-linux-gnu)
5858
bigdecimal
5959
rake (>= 13)
60-
google-protobuf (4.32.1-arm64-darwin)
60+
google-protobuf (4.33.0-arm64-darwin)
6161
bigdecimal
6262
rake (>= 13)
63-
google-protobuf (4.32.1-x64-mingw-ucrt)
63+
google-protobuf (4.33.0-x64-mingw-ucrt)
6464
bigdecimal
6565
rake (>= 13)
66-
google-protobuf (4.32.1-x86_64-darwin)
66+
google-protobuf (4.33.0-x86_64-darwin)
6767
bigdecimal
6868
rake (>= 13)
69-
google-protobuf (4.32.1-x86_64-linux-gnu)
69+
google-protobuf (4.33.0-x86_64-linux-gnu)
7070
bigdecimal
7171
rake (>= 13)
72-
google-protobuf (4.32.1-x86_64-linux-musl)
72+
google-protobuf (4.33.0-x86_64-linux-musl)
7373
bigdecimal
7474
rake (>= 13)
7575
hashery (2.1.2)
@@ -145,7 +145,7 @@ GEM
145145
jgd (1.14.0)
146146
jekyll (>= 1)
147147
trollop (>= 2)
148-
json (2.15.2)
148+
json (2.16.0)
149149
kramdown (2.5.1)
150150
rexml (>= 3.3.9)
151151
kramdown-parser-gfm (1.1.0)
@@ -167,7 +167,7 @@ GEM
167167
metrics (0.15.0)
168168
mini_mime (1.1.5)
169169
multipart-post (2.4.1)
170-
net-http (0.6.0)
170+
net-http (0.7.0)
171171
uri
172172
net-imap (0.5.12)
173173
date
@@ -208,7 +208,7 @@ GEM
208208
hashery (~> 2.0)
209209
ruby-rc4
210210
ttfunk
211-
prism (1.5.2)
211+
prism (1.6.0)
212212
public_suffix (6.0.2)
213213
pygments.rb (4.0.0)
214214
racc (1.8.1)
@@ -237,7 +237,7 @@ GEM
237237
rubocop-ast (>= 1.47.1, < 2.0)
238238
ruby-progressbar (~> 1.7)
239239
unicode-display_width (>= 2.4.0, < 4.0)
240-
rubocop-ast (1.47.1)
240+
rubocop-ast (1.48.0)
241241
parser (>= 3.3.7.2)
242242
prism (~> 1.4)
243243
rubocop-minitest (0.38.2)
@@ -260,24 +260,24 @@ GEM
260260
safe_yaml (1.0.5)
261261
sass (3.7.4)
262262
sass-listen (~> 4.0.0)
263-
sass-embedded (1.93.2-aarch64-linux-gnu)
263+
sass-embedded (1.93.3-aarch64-linux-gnu)
264264
google-protobuf (~> 4.31)
265-
sass-embedded (1.93.2-arm-linux-gnueabihf)
265+
sass-embedded (1.93.3-arm-linux-gnueabihf)
266266
google-protobuf (~> 4.31)
267-
sass-embedded (1.93.2-arm64-darwin)
267+
sass-embedded (1.93.3-arm64-darwin)
268268
google-protobuf (~> 4.31)
269-
sass-embedded (1.93.2-x64-mingw-ucrt)
269+
sass-embedded (1.93.3-x64-mingw-ucrt)
270270
google-protobuf (~> 4.31)
271-
sass-embedded (1.93.2-x86_64-darwin)
271+
sass-embedded (1.93.3-x86_64-darwin)
272272
google-protobuf (~> 4.31)
273-
sass-embedded (1.93.2-x86_64-linux-gnu)
273+
sass-embedded (1.93.3-x86_64-linux-gnu)
274274
google-protobuf (~> 4.31)
275-
sass-embedded (1.93.2-x86_64-linux-musl)
275+
sass-embedded (1.93.3-x86_64-linux-musl)
276276
google-protobuf (~> 4.31)
277277
sass-listen (4.0.0)
278278
rb-fsevent (~> 0.9, >= 0.9.4)
279279
rb-inotify (~> 0.9, >= 0.9.7)
280-
sawyer (0.9.2)
280+
sawyer (0.9.3)
281281
addressable (>= 2.3.5)
282282
faraday (>= 0.17.3, < 3)
283283
scss_lint (0.60.0)
@@ -292,15 +292,15 @@ GEM
292292
tiktoken_ruby (0.0.12-x86_64-darwin)
293293
tiktoken_ruby (0.0.12-x86_64-linux)
294294
tiktoken_ruby (0.0.12-x86_64-linux-musl)
295-
timeout (0.4.3)
295+
timeout (0.4.4)
296296
traces (0.18.2)
297297
trollop (2.9.10)
298298
ttfunk (1.8.0)
299299
bigdecimal (~> 3.1)
300300
typhoeus (1.4.1)
301301
ethon (>= 0.9.0)
302302
unicode-display_width (2.6.0)
303-
uri (1.0.4)
303+
uri (1.1.1)
304304
uuidtools (3.0.0)
305305
w3c_validators (1.3.7)
306306
json (>= 1.8)
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
# SPDX-FileCopyrightText: Copyright (c) 2014-2025 Yegor Bugayenko
3+
# SPDX-License-Identifier: MIT
4+
5+
layout: post
6+
title: "Help Me, My PR Doesn't Merge!"
7+
date: 2025-11-09
8+
place: Moscow, Russia
9+
tags: oss etiquette
10+
description: |
11+
When your pull request won’t merge, don't fight it—fail fast,
12+
split your changes, file bugs, and move on smarter.
13+
keywords:
14+
- merge conflict
15+
- pull request policy
16+
- discipline of pull requests
17+
- resolving conflicts
18+
- pull request
19+
image: /images/2025/11/amores-perros.jpg
20+
jb_picture:
21+
caption: Amores Perros (2000) by Alejandro González Iñárritu
22+
---
23+
24+
You've made a pull request, but it won't merge.
25+
A reviewer says it's not good or the tests don't pass.
26+
No matter what, you can't get it into the master branch.
27+
You keep fixing the branch, keep convincing the reviewer, keep hating the tests.
28+
Stop.
29+
Try smarter tactics.
30+
31+
<!--more-->
32+
33+
{% jb_picture_body %}
34+
35+
## 1. Give Up Instantly
36+
37+
First, [fail fast].
38+
Give up quickly.
39+
If it doesn't go through smoothly, close it.
40+
If the reviewers' complaints are more than stylistic issues, your understanding of the architecture is flawed.
41+
42+
Ask yourself, how did this happen?
43+
Why did you, a smart programmer, get a wrong understanding of the architecture?
44+
Obviously, it's [not your mistake]({% pst 2015/feb/2015-02-16-it-is-not-a-school %}).
45+
It's a bug in the repository.
46+
Its README isn't complete, its code isn't clean enough, its documentation is outdated.
47+
48+
What do you do?
49+
You [blame]({% pst 2025/may/2025-05-25-bug-driven-development %}) them by submitting [bug reports]({% pst 2014/apr/2014-04-13-bugs-are-welcome %}).
50+
Then, when they fix the repository, you try again, with a new pull request.
51+
52+
## 2. Take a Smaller Bite
53+
54+
Most likely they don't complain about all the changes you've made.
55+
Something looks good to them, while they refuse to accept something else.
56+
Good, remove the bad parts from your pull request.
57+
58+
Don't waste time trying to sell the entire package in one go.
59+
Instead, give them as much as they're ready to accept.
60+
In the end, you will merge a few pull requests instead of one.
61+
The more, the better, at least for us in [Zerocracy], where we [reward]({% pst 2018/jul/2018-07-24-bugs-or-pull-requests %}) each merged pull request.
62+
63+
## 3. Blame Them Wisely
64+
65+
This may be a defect in their existing codebase.
66+
Pretty often it is.
67+
Your code can't merge, not because it's broken, but because one of the existing tests is flaky.
68+
This is tricky and it may get ugly.
69+
70+
Don't get negative or frustrated.
71+
You know that it's not your fault.
72+
But they don't.
73+
They believe that your code is defective and their code is perfect.
74+
Moreover, all CI workflows are [green]({% pst 2014/jul/2014-07-21-read-only-master-branch %}) on master, while your branch is red.
75+
Who do we [blame]({% pst 2025/apr/2025-04-19-dont-merge-into-broken-master %})?
76+
Obviously, you.
77+
78+
You have to collect enough evidence and submit a bug report.
79+
It should explain what's wrong in their master branch.
80+
Don't ever mention your pull request.
81+
It's a trap!
82+
If you try to use your pull request as a proof of their mistakes, they won't listen.
83+
84+
Forget about your pull request for a while.
85+
Submit a bug report as if you were a stranger who just found a bug in master.
86+
87+
It may be hard, since master is green.
88+
However, there is no other way around it.
89+
Again, they won't listen if you blame them for the failure in your pull request.
90+
At best, they will explain to you the basics of continuous integration.
91+
92+
## 4. Move On
93+
94+
Just as poker fish (immature players) try to win every hand, junior developers try to merge every pull request.
95+
This is a mistake.
96+
Some problems simply can't be fixed and some features can't be implemented right now.
97+
There will be time for them later.
98+
99+
It's perfectly all right to close a pull request after a negative review.
100+
There's no need to feel obliged to finish it.
101+
It's better to spend time on easier bugs to fix and simpler functionality to implement.
102+
103+
## 5. Don't Call for Help
104+
105+
No matter how hard it is, don't ask them to help you.
106+
"I can't understand why it doesn't merge!"
107+
Don't say this.
108+
109+
They [may help]({% pst 2015/feb/2015-02-16-it-is-not-a-school %}), but it will be annoying for them.
110+
You won't look like a reliable programmer.
111+
The more you ask for help, the more you ruin your reputation.
112+
You must know how to solve issues on your own.
113+
114+
A failed PR isn't a setback.
115+
It's a lesson.
116+
Fail fast, blame smart, and move on stronger.
117+
118+
[fail fast]: https://en.wikipedia.org/wiki/Fail_fast
119+
[Zerocracy]: https://www.zerocracy.com

images/2025/11/amores-perros.jpg

412 KB
Loading

0 commit comments

Comments
 (0)