```ruby
require 'net/http'
require 'json'
require 'octokit'

projects = settings.projects || []

SCHEDULER.every '1h' do
    client = Octokit::Client.new(:access_token => settings.github['token'])
    user = client.user
    user.login
    name = projects.first['repo']
    url_base = "https://api.github.com/repos/" + projects.first['repo']
    # Put together the branches url
    branches_url = URI(url_base + "/git/refs/heads/" + projects.first['branch'])
    latest_sha = latest_committer = commit_message = commit_date = nil
	# Use the branches URL to get the latest commit sha for the branch
    Net::HTTP.start(branches_url.host, branches_url.port, :use_ssl => (branches_url.scheme == 'https')) do |http|
		response = http.request(Net::HTTP::Get.new(branches_url.request_uri))
		data = JSON.parse(response.body)
		latest_sha = data['object']['sha']
	end

	# Commit URL
	commit_url = URI(url_base + "/commits/" + latest_sha)
	Net::HTTP::start(commit_url.host, commit_url.port, :use_ssl => commit_url.scheme == 'https') do |http|
        response = http.request(Net::HTTP::Get.new(commit_url.request_uri))
        data = JSON.parse(response.body)
        latest_committer = data['commit']['committer']['name']
        commit_message = data['commit']['message']
        commit_message = commit_message.split[0...15].join(' ')
    	commit_date = Time.parse(data['commit']['committer']['date']).strftime("%a %b %e %Y")
	end

    send_event('commits', { project:
                            {name: name,
                             committer: latest_committer,
                             commit_message: commit_message,
                             date: commit_date
							}
                          })
    projects.rotate!
end
```

Replace manual requests with Octokit API in commit job.
user
```ruby
require 'net/http'
require 'json'
require 'octokit'

projects = settings.projects || []

SCHEDULER.every '1h' do
  client = Octokit::Client.new(:access_token => settings.github['token'])

  project = projects.first['name']

  latest_sha = latest_committer = commit_message = commit_date = nil

  # SHA hash
  data = client.ref(project, 'heads/' + projects.first['branch'])
	latest_sha = data['object']['sha']

	# Commit
  data = client.git_commit(project, latest_sha)
  latest_committer = data['committer']['name']
  commit_message = data['message']
  commit_message = commit_message.split[0...15].join(' ')
  commit_date = Time.parse(data['committer']['date']).strftime('%a %b %e %Y')

  send_event('commits',
    {
      project: {
        name: name,
        committer: latest_committer,
        commit_message: commit_message,
        date: commit_date
			}
    }
  )
  projects.rotate!
end
```
assistant