You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: repository.rb
    path of file: ./repos/janky/lib/janky
    
    the code of the file until where you have to start completion: module Janky
  class Repository < ActiveRecord::Base
    has_many :branche
    
    def commit_for_sha(sha1)
      commit_data = GitHub.commit(nwo, sha1)
      commit_message = commit_data["commit"]["message"]
      commit_url = github_url("commit/#{sha1}")
      author_data = commit_data["commit"]["author"]
      commit_author =
        if email = author_data["email"]
          "#{author_data["name"]} <#{email}>"
        else
          author_data["name"]
        end