Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Support for GitHub commits #30

@danports

Description

@danports

I thought this code was already in master, but when I rebased my fork recently it disappeared. Was the code deleted from master? Or was this part of my fork that I never pushed?

-- A class for a commit
local Commit = {}
Commit.__index = Commit
Commit.new = function(repo, sha)
	local url = ('repos/%s/%s/git/commits/%s'):format(repo.user, repo.name, sha)
	local status, data = getAPI(url, repo.auth)
	if not status then
		error('Could not get github API from ' ..url)
	end
	return setmetatable({data = data}, Commit)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions