<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Harshita Shankar on Medium]]></title>
        <description><![CDATA[Stories by Harshita Shankar on Medium]]></description>
        <link>https://medium.com/@harshitashankar?source=rss-11dd410223e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PgxHYljxRatzqFDFx01G4Q.jpeg</url>
            <title>Stories by Harshita Shankar on Medium</title>
            <link>https://medium.com/@harshitashankar?source=rss-11dd410223e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:12:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harshitashankar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Add commits to a GitHub PR using Jenkins]]></title>
            <link>https://gitstacks.com/add-commits-to-a-github-pr-using-jenkins-bd30880ba91a?source=rss-11dd410223e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd30880ba91a</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[jenkinsfile]]></category>
            <dc:creator><![CDATA[Harshita Shankar]]></dc:creator>
            <pubDate>Tue, 03 Aug 2021 14:11:22 GMT</pubDate>
            <atom:updated>2021-10-28T15:43:27.502Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I ran into a task, where whenever someone creates a pull request to my GitHub repository, I wanted to run a Jenkins job to validate the PR. If the job decides that the PR needs additional changes, it should commit those changes to the same PR.</p><p>Basically, I wanted a Jenkins job to validate my PR and if needed, add additional commits to the PR.</p><p>Such solution might also be needed if you want to lint the code contributed to your repository.</p><p>Like most people, since I was handling GitHub PRs, my first choice was also to use GitHub Actions. I also found this <a href="https://github.com/stefanzweifel/git-auto-commit-action">GitHub Action</a> that works good if the PR is created only from local branch of the repository. However it does not support PR from forks yet. Hence, I went ahead to use Jenkins because that’s something that I use a lot at work.</p><p>Just to be clear, what I wanted to achieve was:</p><ol><li>User creates a Pull Request</li><li>Jenkins job tied to the repository runs to validate the PR</li><li>Job validates the PR and commits changes if needed</li></ol><p>Following snippet is from the Jenkinsfile that I used. Its pretty verbose and easy to understand if you have worked with Jenkinsfile before</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b23bc45d442d8064f5d15b0abdac66f3/href">https://medium.com/media/b23bc45d442d8064f5d15b0abdac66f3/href</a></iframe><p>If you have something similar to achieve then above snippet is good to go with.</p><p>NOTE: One thing to note is that the GitHub user that Jenkins is using should be added as a collaborator with write access to the fork if your fork/repository is private.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd30880ba91a" width="1" height="1" alt=""><hr><p><a href="https://gitstacks.com/add-commits-to-a-github-pr-using-jenkins-bd30880ba91a">Add commits to a GitHub PR using Jenkins</a> was originally published in <a href="https://gitstacks.com/">GitStacks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>