Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Add Typespec to all Functions/Arguments #10

Closed
1 task done
nelsonic opened this issue Apr 30, 2022 · 1 comment
Closed
1 task done

Chore: Add Typespec to all Functions/Arguments #10

nelsonic opened this issue Apr 30, 2022 · 1 comment

Comments

@nelsonic
Copy link
Member

nelsonic commented Apr 30, 2022

I don't have time to do this right now but it's a really nice to have.

@nelsonic
Copy link
Member Author

nelsonic commented May 6, 2022

Added to all functions. e.g:

gogs/lib/gogs.ex

Lines 150 to 161 in 578e956

@spec commit(String.t(), map) :: {:ok, any} | {:error, any}
def commit(repo_name, params) do
repo = %Git.Repository{path: local_repo_path(repo_name)}
# Add all files in the repo
{:ok, _output} = Git.add(repo, ["."])
# Commit with message
{:ok, _output} = Git.commit(repo, [
"-m",
params.message,
~s(--author="#{params.full_name} <#{params.email}>")
])
end

Definitely a nice-to-have. But ticks the box. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant