Skip to content

Instantly share code, notes, and snippets.

@jurre
Created February 5, 2014 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jurre/8831018 to your computer and use it in GitHub Desktop.
Save jurre/8831018 to your computer and use it in GitHub Desktop.
require "octokit"
Octokit.configure do |c|
c.access_token = "YOUR_GITHUB_ACCESS_TOKEN",
c.auto_paginate = true
end
# get all comments from all issues
comments = Octokit.issues_comments("DefactoSoftware/CAPP11")
# only select the ones that start with something like 'Release note:'
notes = comments.select do |comment|
comment.body.downcase.start_with?("release note")
end
# format them nicely
release_notes = notes.map do |n|
"#{n.updated_at.strftime("%F")}\n#{n.body} (#{n.user.login})\n#{"-" * 80}\n\n"
end
@Marthyn
Copy link

Marthyn commented Feb 5, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment