Created
February 5, 2014 19:16
-
-
Save jurre/8831018 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍