HeyMehedi
HeyMehedi

Reputation: 21

Contribute to WordPress Plugin using SVN

I want to contribute to a WordPress plugin, I asked plugin support, and they only have the WordPress default SVN repo.

I don't how to send pull requests using SVN,

Can anybody assist me, please?

Thanks

Upvotes: 2

Views: 269

Answers (3)

kerry
kerry

Reputation: 691

i use Ubuntu and found RapidSVN a good solution for managing plugins via the WordPress SVN. It's free, in the software store, easy to install and are a couple of good tutorials on WordPress SVN and plugins as well as RapidSVN at https://diversify.me.uk/how-to-use-the-wordpress-svn-quick-start-tutorial/

Upvotes: 0

Ginger Jesus
Ginger Jesus

Reputation: 474

I ended up asking a similar question on the [email protected] mailing list. Here’s what I learned:

It doesn’t look like there’s a direct equivalent of GitHub-style pull requests for Subversion. Here’s the normal process for proposing changes to Subversion repos:

  1. Choose a repo that you want to contribute to. In this example, I’m going to contribute to https://svn.apache.org/repos/asf/subversion/.

  2. If you don’t already have a one, then make a working copy of the project’s trunk:

    svn checkout https://svn.apache.org/repos/asf/subversion/trunk/ subversion-trunk
    

    Notice how I added trunk/ to the end of the URL. If you don’t do that, then it will include more than just the trunk in your working copy which will make things take longer.

  3. cd into your working copy:

    cd subversion-trunk
    
  4. If you already had a working copy and it’s been sitting around for a while, then update it:

    svn update
    
  5. Make the changes that you want to contribute.

  6. Generate a patch:

    svn diff -x-p > ../my-changes.patch
    
  7. Email the patch to the project’s mailing list. When writing your email, be sure to…

    • …put “[PATCH]” the in the subject of your email.

    • …write a log message for your patch. Put it between triple square brackets like this:

      Hi,
      
      Here’s my log message:
      
      [[[
      * README:
        Add some nonsense as an example
      ]]]
      
      I hope that I did a good job at writing that log message.
      
    • …either copy and paste the patch file into the body of the email or attach it to the email. Personally, I recommend attaching it because many email clients mess up the formatting of patches when you put them in to body of your message.

As far as I know, that’s the normal process for contributing code within the Apache Software Foundation. The process might be different elsewhere.

Upvotes: 0

Valerii Vasyliev
Valerii Vasyliev

Reputation: 469

If you use GitHub, you can implement with GitHub action for deploying to WordPress SVN

See the documentation:

https://github.com/10up/action-wordpress-plugin-deploy

 - name: WordPress Plugin Deploy
      uses: 10up/action-wordpress-plugin-deploy@stable
      env:
        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
        SLUG: my-super-cool-plugin # optional, remove if GitHub repo name matches SVN slug, including capitalization

Upvotes: -1

Related Questions