Top

How to Use Custom Post Types to Automatically Display Google Code Project Commits on Your WordPress Site

July 29, 2010

This is a tutorial for developers who host projects with Google Code and blog with WordPress. Suppose you could create an automatically-updating archive of your SVN activity for a project you’re working on? The Google Code Commit Tracking plugin for WordPress 3.0 allows you to do just that!

Whenever you make an SVN commit on a Google Code project, you can instruct Google to send a notice to someplace else. This plugin enables WordPress to receive those notices and output them as an SVN Activity custom post type. You’ll be able to view them in a list under the SVN Activity custom post menu in your dashboard:

How to Link Your Google Code Project’s SVN Activity to Your WordPress Site

If you’re setting up your Google Code account for the first time, make sure to select SVN for your repository type if you plan to use this plugin.

  1. After installing Google Code Commit Tracking on your WordPress site, go to your Google Code account and copy the Post Commit Authentication Key from the Administer > Source.
  2. Paste into the Settings > Google Code options page.
  3. Copy the Post-Commit URL on the Config page into the Google Code Post-Commit URL field on Administer > Source.
  4. Then you can create a custom page template for the page where you want to display the updates and query the SVN post types using something like this:
    <?php query_posts( 'post_type=svn'); ?>

Now you have a page that will update automatically every time you commit, without you having to do a thing. This is especially useful if you are collaborating on a project with other developers or have a number of people interested in your project who don’t use Google Code. Importing your SVN activity as custom post types lets your site’s visitors to interact with your project by commenting on the updates and following via subscription. Keep everyone up to date with your project directly through your WordPress site!

Tweet This Post

Because this plugin/widget is provided free of charge, I simply ask you to link back to Pressography.com in a post on your blog, or from one of your sites. It doesn't need to be anything fancy - just a note saying that you're using it, and whether or not you like it. However, there is no requirement that you do this, you're free to use the plugin regardless.

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.