Created
July 3, 2014 12:16
-
-
Save furaji/9d7ee5e53a2882c09f6d to your computer and use it in GitHub Desktop.
githubのissueを複製する
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" | |
before_rep = "name/repname" | |
after_rep = "other_name/other_repname" | |
client = Octokit::Client.new(access_token: ENV["GITHUB_API_TOKEN"]) | |
options = { | |
state: :all | |
} | |
issues = client.list_issues before_rep, options | |
p "issueは#{issues.count}件あります" | |
issues.each.with_index(1) do |issue, index| | |
client.create_issue(after_rep, issue.title, issue.body) | |
p "#{index}件目のissueを登録しました" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment