Skip to content

Commit 1b23e82

Browse files
authored
Update merge conflict resolution instructions (#60)
Task: https://app.asana.com/1/137249556945/project/1203301625297703/task/1211667131698044?focus=true This PR updates the instructions on how to handle merge conflicts.
1 parent b2cd373 commit 1b23e82

5 files changed

Lines changed: 111 additions & 9 deletions

File tree

lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml.erb

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ html_notes: |
44
Failed to tag the release with <code><%= tag %></code> tag.<br>
55
Please follow instructions below to tag the branch, make GitHub release and merge release branch to <code><%= base_branch %></code> manually.<br>
66
<br>
7-
Issue the following git commands to tag the release and merge the branch:
7+
First, disable branch protection on the apple-browsers repository:
8+
<ul>
9+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
10+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
11+
<li>Scroll down to the bottom and click 'Save changes'</li>
12+
<li>Authenticate with GitHub to approve the ruleset change</li>
13+
</ul>
14+
<br>
15+
Next, issue the following git commands to tag the release and merge the branch:
816
<ul>
917
<li><code>git fetch origin</code></li>
1018
<li><code>git checkout <%= branch %></code> switch to the release branch</li>
@@ -23,7 +31,16 @@ html_notes: |
2331
</ul></li>
2432
</ul></li>
2533
<li><code>git push origin <%= base_branch %></code> push merged branch</li>
26-
</ul><br>
34+
</ul>
35+
<br>
36+
Finally, re-enable branch protection:
37+
<ul>
38+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
39+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
40+
<li>Scroll down to the bottom and click 'Save changes'</li>
41+
<li>Authenticate with GitHub to approve the ruleset change</li>
42+
</ul>
43+
<br>
2744
To create GitHub release:
2845
<ul>
2946
<li>Set up GH CLI if you haven't yet: <a data-asana-gid='1203791243007683'/></li>

lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml.erb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ html_notes: |
44
The <code><%= tag %></code> release has been successfully tagged and published in GitHub releases, <%= '' %>
55
but merging to <code><%= base_branch %></code> failed. Please resolve conflicts and merge <code><%= tag %></code> tag to <code><%= base_branch %></code> manually.<br>
66
<br>
7-
Issue the following git commands:
7+
First, disable branch protection on the apple-browsers repository:
8+
<ul>
9+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
10+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
11+
<li>Scroll down to the bottom and click 'Save changes'</li>
12+
<li>Authenticate with GitHub to approve the ruleset change</li>
13+
</ul>
14+
<br>
15+
Next, issue the following git commands:
816
<ul>
917
<li><code>git fetch origin --tags</code></li>
1018
<li><code>git checkout <%= base_branch %></code> switch to <%= base_branch %></li>
@@ -21,6 +29,15 @@ html_notes: |
2129
</ul></li>
2230
<li><code>git push origin <%= base_branch %></code> push merged branch</li>
2331
</ul>
32+
<br>
33+
Finally, re-enable branch protection:
34+
<ul>
35+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
36+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
37+
<li>Scroll down to the bottom and click 'Save changes'</li>
38+
<li>Authenticate with GitHub to approve the ruleset change</li>
39+
</ul>
40+
<br>
2441
Complete this task when ready and proceed with testing the build.<br>
2542
<br>
2643
🔗 Workflow URL: <a href='<%= workflow_url %>'><%= workflow_url %></a>.

lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-merge-failed-untagged-commits.yml.erb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ html_notes: |
44
You've requested proceeding with public release despite untagged commits on the <code><%= branch %></code> branch, <%= '' %>
55
but merging to <code><%= base_branch %></code> failed. Please resolve conflicts and merge <code><%= branch %></code> to <code><%= base_branch %></code> manually.<br>
66
<br>
7-
Issue the following git commands:
7+
First, disable branch protection on the apple-browsers repository:
8+
<ul>
9+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
10+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
11+
<li>Scroll down to the bottom and click 'Save changes'</li>
12+
<li>Authenticate with GitHub to approve the ruleset change</li>
13+
</ul>
14+
<br>
15+
Next, issue the following git commands:
816
<ul>
917
<li><code>git fetch origin --tags</code></li>
1018
<li><code>git checkout <%= branch %></code> switch to the release branch</li>
@@ -18,6 +26,15 @@ html_notes: |
1826
</ul></li>
1927
<li><code>git push origin <%= base_branch %></code> push merged branch</li>
2028
</ul>
29+
<br>
30+
Finally, re-enable branch protection:
31+
<ul>
32+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
33+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
34+
<li>Scroll down to the bottom and click 'Save changes'</li>
35+
<li>Authenticate with GitHub to approve the ruleset change</li>
36+
</ul>
37+
<br>
2138
Complete this task when done with merging, and re-run the public release workflow, still setting <i>Ignore unreleased changes when making a public release?</i> option to <code>true</code>.<br>
2239
<br>
2340
🔗 Workflow URL: <a href='<%= workflow_url %>'><%= workflow_url %></a>.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module DdgAppleAutomation
3-
VERSION = "3.1.3"
3+
VERSION = "3.1.4"
44
end
55
end

spec/asana_create_action_item_action_spec.rb

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,15 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
319319
Failed to tag the release with <code>1.1.0-123</code> tag.<br>
320320
Please follow instructions below to tag the branch, make GitHub release and merge release branch to <code>main</code> manually.<br>
321321
<br>
322-
Issue the following git commands to tag the release and merge the branch:
322+
First, disable branch protection on the apple-browsers repository:
323+
<ul>
324+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
325+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
326+
<li>Scroll down to the bottom and click 'Save changes'</li>
327+
<li>Authenticate with GitHub to approve the ruleset change</li>
328+
</ul>
329+
<br>
330+
Next, issue the following git commands to tag the release and merge the branch:
323331
<ul>
324332
<li><code>git fetch origin</code></li>
325333
<li><code>git checkout release/1.1.0</code> switch to the release branch</li>
@@ -338,7 +346,16 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
338346
</ul></li>
339347
</ul></li>
340348
<li><code>git push origin main</code> push merged branch</li>
341-
</ul><br>
349+
</ul>
350+
<br>
351+
Finally, re-enable branch protection:
352+
<ul>
353+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
354+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
355+
<li>Scroll down to the bottom and click 'Save changes'</li>
356+
<li>Authenticate with GitHub to approve the ruleset change</li>
357+
</ul>
358+
<br>
342359
To create GitHub release:
343360
<ul>
344361
<li>Set up GH CLI if you haven't yet: <a data-asana-gid='1203791243007683'/></li>
@@ -374,7 +391,15 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
374391
The <code>1.0.0-123</code> release has been successfully tagged and published in GitHub releases,#{' '}
375392
but merging to <code>main</code> failed. Please resolve conflicts and merge <code>1.0.0-123</code> tag to <code>main</code> manually.<br>
376393
<br>
377-
Issue the following git commands:
394+
First, disable branch protection on the apple-browsers repository:
395+
<ul>
396+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
397+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
398+
<li>Scroll down to the bottom and click 'Save changes'</li>
399+
<li>Authenticate with GitHub to approve the ruleset change</li>
400+
</ul>
401+
<br>
402+
Next, issue the following git commands:
378403
<ul>
379404
<li><code>git fetch origin --tags</code></li>
380405
<li><code>git checkout main</code> switch to main</li>
@@ -391,6 +416,15 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
391416
</ul></li>
392417
<li><code>git push origin main</code> push merged branch</li>
393418
</ul>
419+
<br>
420+
Finally, re-enable branch protection:
421+
<ul>
422+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
423+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
424+
<li>Scroll down to the bottom and click 'Save changes'</li>
425+
<li>Authenticate with GitHub to approve the ruleset change</li>
426+
</ul>
427+
<br>
394428
Complete this task when ready and proceed with testing the build.<br>
395429
<br>
396430
🔗 Workflow URL: <a href='https://workflow.com'>https://workflow.com</a>.
@@ -645,7 +679,15 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
645679
You've requested proceeding with public release despite untagged commits on the <code>release/1.0.0</code> branch,#{' '}
646680
but merging to <code>main</code> failed. Please resolve conflicts and merge <code>release/1.0.0</code> to <code>main</code> manually.<br>
647681
<br>
648-
Issue the following git commands:
682+
First, disable branch protection on the apple-browsers repository:
683+
<ul>
684+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
685+
<li>Click on the 'Active' enforcement status dropdown and change it to 'Disabled'</li>
686+
<li>Scroll down to the bottom and click 'Save changes'</li>
687+
<li>Authenticate with GitHub to approve the ruleset change</li>
688+
</ul>
689+
<br>
690+
Next, issue the following git commands:
649691
<ul>
650692
<li><code>git fetch origin --tags</code></li>
651693
<li><code>git checkout release/1.0.0</code> switch to the release branch</li>
@@ -659,6 +701,15 @@ def fetch_assignee_id(task_id:, github_handle:, asana_access_token:, is_schedule
659701
</ul></li>
660702
<li><code>git push origin main</code> push merged branch</li>
661703
</ul>
704+
<br>
705+
Finally, re-enable branch protection:
706+
<ul>
707+
<li>Open the <a href='https://github.com/duckduckgo/apple-browsers/settings/rules/3717807'>Main Branch branch protection ruleset settings</a></li>
708+
<li>Click on the 'Disabled' enforcement status dropdown and change it to 'Active'</li>
709+
<li>Scroll down to the bottom and click 'Save changes'</li>
710+
<li>Authenticate with GitHub to approve the ruleset change</li>
711+
</ul>
712+
<br>
662713
Complete this task when done with merging, and re-run the public release workflow, still setting <i>Ignore unreleased changes when making a public release?</i> option to <code>true</code>.<br>
663714
<br>
664715
🔗 Workflow URL: <a href='https://workflow.com'>https://workflow.com</a>.

0 commit comments

Comments
 (0)