Merge pull request #7954 from dawidd6/workflow-dispatch-event
utils/github: add workflow_dispatch_event method
This commit is contained in:
commit
d579725f7c
@ -450,6 +450,13 @@ module GitHub
|
|||||||
scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
|
scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def workflow_dispatch_event(user, repo, workflow, ref, **inputs)
|
||||||
|
url = "#{API_URL}/repos/#{user}/#{repo}/actions/workflows/#{workflow}/dispatches"
|
||||||
|
open_api(url, data: { ref: ref, inputs: inputs },
|
||||||
|
request_method: :POST,
|
||||||
|
scopes: CREATE_ISSUE_FORK_OR_PR_SCOPES)
|
||||||
|
end
|
||||||
|
|
||||||
def get_artifact_url(user, repo, pr, workflow_id: "tests.yml", artifact_name: "bottles")
|
def get_artifact_url(user, repo, pr, workflow_id: "tests.yml", artifact_name: "bottles")
|
||||||
scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES
|
scopes = CREATE_ISSUE_FORK_OR_PR_SCOPES
|
||||||
base_url = "#{API_URL}/repos/#{user}/#{repo}"
|
base_url = "#{API_URL}/repos/#{user}/#{repo}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user