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

Support for GitHub commits #30

Open
danports opened this issue Apr 19, 2020 · 1 comment · May be fixed by #31
Open

Support for GitHub commits #30

danports opened this issue Apr 19, 2020 · 1 comment · May be fixed by #31

Comments

@danports
Copy link
Contributor

danports commented Apr 19, 2020

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
@danports
Copy link
Contributor Author

Most likely I wrote this code a while ago and forgot about it...I'll clean it up and submit a PR.

danports added a commit to danports/computercraft-github that referenced this issue Apr 19, 2020
danports added a commit to danports/computercraft-github that referenced this issue Apr 19, 2020
@danports danports linked a pull request Apr 19, 2020 that will close this issue
danports added a commit to danports/computercraft-github that referenced this issue Apr 20, 2020
danports added a commit to danports/computercraft-github that referenced this issue Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant