Skip to content

Commit 00e3b4b

Browse files
committed
add Admin.refresh_bounty/1
1 parent e16e671 commit 00e3b4b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/algora/admin/admin.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ defmodule Algora.Admin do
2121

2222
require Logger
2323

24+
def refresh_bounty(url) do
25+
with %{owner: owner, repo: repo, number: number} <- parse_ticket_url(url),
26+
{:ok, ticket} <- Workspace.ensure_ticket(token_for(owner), owner, repo, number) do
27+
Bounties.try_refresh_bounty_response(token_for(owner), %{owner: owner, repo: repo, number: number}, ticket)
28+
end
29+
end
30+
2431
def create_tip_intent(recipient, amount, ticket_ref) do
2532
with installation_id when not is_nil(installation_id) <- Workspace.get_installation_id_by_owner(ticket_ref.owner) do
2633
Bounties.build_tip_intent(

0 commit comments

Comments
 (0)