Skip to content

Add helper to get runID from Custom Deployment Protection Rule Event #3476

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

Merged
merged 19 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
309da8b
add helper function to parse DeploymentCallBackURL to get RunID
pputman-clabs Feb 12, 2025
19449c0
added a test to make sure it got the runID properly
pputman-clabs Feb 12, 2025
52886c4
Add check for regex match
pputman-clabs Feb 12, 2025
4d2ad31
fix runID regex to only match on integers
pputman-clabs Feb 12, 2025
fa18394
add test for incorrect runID string
pputman-clabs Feb 12, 2025
918be15
revert go.mod and go.sum
pputman-clabs Feb 13, 2025
20afbb0
go format
pputman-clabs Feb 13, 2025
6cf202a
Merge branch 'master' into pputman/add-helper-function
pputman-clabs Feb 13, 2025
8564c96
remove error type checking as we only need to see if an error is retu…
pputman-clabs Feb 13, 2025
fbb37e4
Merge branch 'pputman/add-helper-function' of github.com:pputman-clab…
pputman-clabs Feb 13, 2025
84cdc28
go format
pputman-clabs Feb 13, 2025
3e68ecc
touch up the regex
pputman-clabs Feb 13, 2025
421a652
remove new custom error type since it provides no real benefit
pputman-clabs Feb 13, 2025
4fb5ed1
add comments to actions_worklow_runs.go methods that use RunID about …
pputman-clabs Feb 13, 2025
ffea876
Merge branch 'master' into pputman/add-helper-function
pputman-clabs Feb 13, 2025
d0396e5
fix linting issues
pputman-clabs Feb 13, 2025
5c6ddb2
Merge branch 'pputman/add-helper-function' of github.com:pputman-clab…
pputman-clabs Feb 13, 2025
5211c38
Rename regex to something more descriptive
pputman-clabs Feb 13, 2025
af36bac
run script/generate.sh for linter
pputman-clabs Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
run script/generate.sh for linter
  • Loading branch information
pputman-clabs committed Feb 13, 2025
commit af36bac76dd5cc8275225bb2afab720cbdeda997
3 changes: 2 additions & 1 deletion github/actions_workflow_runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (s *ActionsService) ListRepositoryWorkflowRuns(ctx context.Context, owner,
return runs, resp, nil
}

// GetWorkflowRunByID gets a specific workflow run by ID.
// GetWorkflowRunByID gets a specific workflow run by ID.
// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent.
//
// GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#get-a-workflow-run
Expand Down Expand Up @@ -341,6 +341,7 @@ func (s *ActionsService) RerunFailedJobsByID(ctx context.Context, owner, repo st
// RerunJobByID re-runs a job and its dependent jobs in a workflow run by ID.
//
// You can use the helper function *DeploymentProtectionRuleEvent.GetRunID() to easily retrieve the workflow run ID from a DeploymentProtectionRuleEvent.
//
// GitHub API docs: https://docs.github.com/rest/actions/workflow-runs#re-run-a-job-from-a-workflow-run
//
//meta:operation POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun
Expand Down
Loading