<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Piyush Soni</title>
    <description>The latest articles on DEV Community by Piyush Soni (@piyush_soni_74c459572e149).</description>
    <link>https://dev.to/piyush_soni_74c459572e149</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4189628%2F2c82958e-0528-4089-bc23-f26c36c86d0c.jpg</url>
      <title>DEV Community: Piyush Soni</title>
      <link>https://dev.to/piyush_soni_74c459572e149</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piyush_soni_74c459572e149"/>
    <language>en</language>
    <item>
      <title>How I stopped babysitting late-night releases</title>
      <dc:creator>Piyush Soni</dc:creator>
      <pubDate>Fri, 16 Oct 2026 23:15:40 +0000</pubDate>
      <link>https://dev.to/piyush_soni_74c459572e149/how-i-stopped-babysitting-late-night-releases-4ko4</link>
      <guid>https://dev.to/piyush_soni_74c459572e149/how-i-stopped-babysitting-late-night-releases-4ko4</guid>
      <description>&lt;p&gt;For a long time my release process looked like this: build a feature, test it well on staging, and then be told it should go live after business hours. So I'd stay up, merge the pull request at the right time, watch the deploy, and be ready to roll it back.&lt;/p&gt;

&lt;p&gt;That's a boring job for a person. Here is what I automated, and the traps I found.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Merge the commit you approved, not whatever is on the branch
&lt;/h3&gt;

&lt;p&gt;If you schedule a merge for 11 pm and someone pushes at 10:50, a naive scheduler merges code nobody reviewed. The fix is to pin the PR's head commit when you schedule. At merge time, if the head changed, skip the release and say so.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Check again at merge time
&lt;/h3&gt;

&lt;p&gt;Required checks, conflicts and approvals can change in the hours between scheduling and merging. Run the prechecks twice: when you schedule, and right before you merge.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Watch the deploy, not just the merge
&lt;/h3&gt;

&lt;p&gt;A merge isn't done until the deploy is green. After merging, find the workflow run that the push triggered (&lt;code&gt;workflow_run&lt;/code&gt; webhooks make this reliable) and follow it to the end. Capture the failed job and step, plus a few lines around the error, so the email says why it failed.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Revert only if it's safe
&lt;/h3&gt;

&lt;p&gt;The riskiest part is the automatic revert. If the branch has moved on since your merge, reverting would also undo other people's work. So: revert automatically only when your merge is still the tip, open it as a normal revert pull request (no history rewriting), wait for the redeploy, and otherwise just tell a human.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Know what you can't undo
&lt;/h3&gt;

&lt;p&gt;Database migrations and infrastructure changes deployed outside the push workflow can't be rolled back by reverting a commit. Detect pull requests that touch those paths and warn before scheduling.&lt;/p&gt;

&lt;h3&gt;
  
  
  The tool
&lt;/h3&gt;

&lt;p&gt;I put this together as &lt;strong&gt;Merge Scheduler&lt;/strong&gt;, a GitHub App that does all of the above: &lt;a href="https://mergescheduler.gentlesoni.online/?utm_source=devto" rel="noopener noreferrer"&gt;mergescheduler.gentlesoni.online&lt;/a&gt;. There is a free plan with no time limit. It only touches the repositories you pick and doesn't keep your code (&lt;a href="https://mergescheduler.gentlesoni.online/security" rel="noopener noreferrer"&gt;what it asks for and why&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If you handle after-hours releases differently, I'd like to hear how in the comments.&lt;/p&gt;

</description>
      <category>github</category>
      <category>devops</category>
      <category>cicd</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
