Skip to content

Commit 9244b1f

Browse files
committed
refactor: remove claim created comment in NotifyClaim job
1 parent 37e4267 commit 9244b1f

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/algora/bounties/jobs/notify_claim.ex

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,11 @@ defmodule Algora.Bounties.Jobs.NotifyClaim do
2525
)
2626
|> Repo.all()
2727
|> Repo.preload([:user, source: [repository: [:user]], target: [repository: [:user]]]),
28-
{:ok, _} <- maybe_add_labels(token, claims),
29-
{:ok, _} <- add_comment(token, claims) do
28+
{:ok, _} <- maybe_add_labels(token, claims) do
3029
:ok
3130
end
3231
end
3332

34-
defp add_comment(token, claims) do
35-
primary_claim = List.first(claims)
36-
37-
names =
38-
claims
39-
|> Enum.map(fn c -> "@#{c.user.provider_login}" end)
40-
|> Algora.Util.format_name_list()
41-
42-
Github.create_issue_comment(
43-
token,
44-
primary_claim.target.repository.user.provider_login,
45-
primary_claim.target.repository.name,
46-
primary_claim.target.number,
47-
"💡 #{names} submitted [#{Claim.type_label(primary_claim.type)}](#{primary_claim.url}) that claims the bounty. You can visit [Algora](#{Claim.reward_url(primary_claim)}) to reward."
48-
)
49-
end
50-
5133
defp maybe_add_labels(token, claims) do
5234
primary_claim = List.first(claims)
5335

0 commit comments

Comments
 (0)