diff --git a/grn.drush.inc b/grn.drush.inc
index 6b52d87..bc41fc1 100644
--- a/grn.drush.inc
+++ b/grn.drush.inc
@@ -87,7 +87,15 @@ function drush_grn_release_notes($tag1n, $tag2n) {
   }
   $tag2 = drush_shell_exec_output();
   $changes = _drush_grn_get_changes($tag1[0], $tag2[0], $git);
-  drush_print(_drush_grn_format_changes($changes, $tag1n, $tag1[0], $tag2[0], $git));
+
+  $items = _drush_grn_format_changes($changes, $tag1n, $tag1[0], $tag2[0], $git);
+  if (drush_get_context('DRUSH_PIPE')) {
+    drush_print_pipe(array_keys($items['raw']));
+  }
+  else {
+    drush_print($items['rendered']);
+  }
+
   return TRUE;
 }
 
@@ -97,11 +105,11 @@ function drush_grn_release_notes($tag1n, $tag2n) {
  * Generates the output.
  */
 function _drush_grn_format_changes($issues, $prev_tag, $tag1, $tag2, $git) {
-  $return = "<p>Changes since $prev_tag";
+  $rendered = "<p>Changes since $prev_tag";
   if (drush_get_option('commit-count')) {
-    $return .= ' (' . trim(drush_get_option('commit-count')) . ' commits)';
+    $rendered .= ' (' . trim(drush_get_option('commit-count')) . ' commits)';
   }
-  $return .= ":</p>\n";
+  $rendered .= ":</p>\n";
 
   $baseurl = drush_get_option('baseurl', '/node/');
   if (strpos($baseurl, '%s') == FALSE) {
@@ -113,15 +121,15 @@ function _drush_grn_format_changes($issues, $prev_tag, $tag1, $tag2, $git) {
     // Clean up commit log.
     $item = preg_replace('/^(Patch |- |Issue ){0,3}/', '', $line);
     // Add issue links.
-    $items[] = preg_replace('/#(\d+)/S', '<a href="' . str_replace('%s', '$1', $baseurl) . '">#$1</a>', $item);
+    $items[$item] = preg_replace('/#(\d+)/S', '<a href="' . str_replace('%s', '$1', $baseurl) . '">#$1</a>', $item);
   }
   drush_command_invoke_all_ref('release_notes_output_alter', $items);
 
   if (!empty($items)) {
-    $return .= "<ul>\n  <li>" . implode("</li>\n  <li>", $items) . "</li>\n</ul>";
+    $rendered .= "<ul>\n  <li>" . implode("</li>\n  <li>", $items) . "</li>\n</ul>";
   }
 
-  return $return;
+  return array('rendered' => $rendered, 'raw' => $items);
 }
 
 /**
