mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[PR #889] [MERGED] feat: try to read ref and sha from event payload if available #1668
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1668
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/889
Author: @ZauberNerd
Created: 11/17/2021
Status: ✅ Merged
Merged: 1/21/2022
Merged by: @cplee
Base:
master← Head:set-ref-sha📝 Commits (1)
18c3c61feat: try to read ref and sha from event payload if available📊 Changes
3 files changed (+247 additions, -51 deletions)
View changed files
📝
pkg/model/github_context.go(+113 -0)➕
pkg/model/github_context_test.go(+132 -0)📝
pkg/runner/run_context.go(+2 -51)📄 Description
With this change
actwill try to populate thegithubContext.refandgithubContext.shawith values read from the event payload.Caveats:
page_buildshould not have a refstatusshould not have a refregistry_packageshould set the ref to the branch/tag but thepayload isn't documented
workflow_callshould set ref to the same value as its caller but thepayload isn't documented
but unfortunately the sha is not always included in the payload,
therefore we use the sha from the local git checkout
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.