forgejo-runner-act/pkg/model
Björn Brauer edd0fb92a7
feat: try to read ref and sha from event payload if available (#889)
With this change `act` will try to populate the `githubContext.ref` and
`githubContext.sha` with values read from the event payload.

Caveats:
- `page_build` should not have a ref
- `status` should not have a ref
- `registry_package` should set the ref to the branch/tag but the
  payload isn't documented
- `workflow_call` should set ref to the same value as its caller but the
  payload isn't documented
- most of the events should set the sha to the last commit on the ref
  but unfortunately the sha is not always included in the payload,
  therefore we use the sha from the local git checkout

Co-Authored-By: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>

Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
2022-01-21 08:10:00 -08:00
..
testdata Simplify Matrix decode, add defaults for fail-fast and max-parallel, add test (#763) 2021-08-09 15:35:05 +00:00
action.go feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
github_context.go feat: try to read ref and sha from event payload if available (#889) 2022-01-21 08:10:00 -08:00
github_context_test.go feat: try to read ref and sha from event payload if available (#889) 2022-01-21 08:10:00 -08:00
job_context.go refactor: export and move shared contexts into pkg/model (#931) 2021-12-22 19:52:09 +00:00
planner.go fix: continue jobs + steps after failure (#840) 2021-12-08 20:57:42 +00:00
planner_test.go refactor: NewWorkflowPlanner (#648) 2021-05-03 07:57:24 -07:00
step_result.go refactor: export and move shared contexts into pkg/model (#931) 2021-12-22 19:52:09 +00:00
workflow.go Feature: uses in composite (#793) 2021-12-22 19:19:50 +00:00
workflow_test.go fix: rework setupShellCommand (#930) 2021-12-22 06:37:16 +00:00