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

Commit 2298a13

Browse files
committed
address @SimonLab PR review comments #11 (review)
1 parent 4fd3fc6 commit 2298a13

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ by adding `gitea` to the list of dependencies in your `mix.exs` file:
9191
```elixir
9292
def deps do
9393
[
94-
{:gitea, "~> 1.0.2"},
94+
{:gitea, "~> 1.0.3"},
9595
]
9696
end
9797
```
@@ -224,7 +224,7 @@ you can read any file inside it.
224224
org_name = "myorg"
225225
repo_name = "public-repo"
226226
file_name = "README.md"
227-
{:ok, text} == Gitea.local_file_read(org_name, repo_name, file_name)
227+
{:ok, text} = Gitea.local_file_read(org_name, repo_name, file_name)
228228
```
229229

230230
### 4. _Write_ to a File

lib/gitea.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ defmodule Gitea do
217217
def commit(org_name, repo_name, params) do
218218
repo = local_git_repo(org_name, repo_name)
219219
# Add all files in the repo
220-
{:ok, _output} = Git.add(repo, [".", "-f"])
220+
{:ok, _output} = Git.add(repo, ["."])
221221
# Commit with message
222222
{:ok, _output} =
223223
Git.commit(repo, [

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Gitea.MixProject do
66
def project do
77
[
88
app: :gitea,
9-
version: "1.0.2",
9+
version: "1.0.3",
1010
elixir: @elixir_requirement,
1111
start_permanent: Mix.env() == :prod,
1212
deps: deps(),

test/gitea_test.exs

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ defmodule GiteaTest do
123123
org_name = "myorg"
124124
repo_name = create_test_git_repo(org_name)
125125
# delete draft branch if exists:
126-
{:ok, branch_name} = Git.branch(%Git.Repository{path: @cwd}, ~w(--show-current)) |> IO.inspect()
127-
Git.branch(Gitea.Helpers.local_git_repo(org_name, repo_name), ~w(-D draft)) |> IO.inspect()
126+
{:ok, branch_name} = Git.branch(%Git.Repository{path: @cwd}, ~w(--show-current))
127+
Git.branch(Gitea.Helpers.local_git_repo(org_name, repo_name), ~w(-D draft))
128128

129129
{:ok, res} = Gitea.local_branch_create(org_name, repo_name, "draft")
130130
assert res == "Switched to a new branch 'draft'\n"
131131

132132
# Cleanup!
133133
branch_name = String.replace(branch_name, "\n", "")
134-
Git.checkout(%Git.Repository{path: @cwd}, [branch_name]) |> IO.inspect()
135-
Git.branch(Gitea.Helpers.local_git_repo(org_name, repo_name), ~w(-D draft)) |> IO.inspect()
134+
Git.checkout(%Git.Repository{path: @cwd}, [branch_name])
135+
Git.branch(Gitea.Helpers.local_git_repo(org_name, repo_name), ~w(-D draft))
136136
teardown_local_and_remote(org_name, repo_name)
137137
end
138138

0 commit comments

Comments
 (0)