[PR #1362] [MERGED] fix: align github.ref to GitHub Action #1903

Closed
opened 2026-03-01 21:53:10 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1362
Author: @KnisterPeter
Created: 9/26/2022
Status: Merged
Merged: 9/26/2022
Merged by: @mergify[bot]

Base: masterHead: fix-github-context-ref


📝 Commits (2)

  • df84ae4 fix: align github.ref to GitHub Action
  • 00a277d fix: correct existing assertions

📊 Changes

4 files changed (+52 additions, -7 deletions)

View changed files

📝 pkg/model/github_context.go (+6 -3)
📝 pkg/model/github_context_test.go (+3 -3)
📝 pkg/runner/run_context.go (+1 -1)
📝 pkg/runner/run_context_test.go (+42 -0)

📄 Description

The github.ref value should be refs/heads/branch in most cases.
There are a few exceptions handled by the code.

This change prefixes the default case with refs/heads and adds
tests for this and the excpetional cases.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1362 **Author:** [@KnisterPeter](https://github.com/KnisterPeter) **Created:** 9/26/2022 **Status:** ✅ Merged **Merged:** 9/26/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `fix-github-context-ref` --- ### 📝 Commits (2) - [`df84ae4`](https://github.com/nektos/act/commit/df84ae43edace536614a3f4df13a6ca576b164de) fix: align github.ref to GitHub Action - [`00a277d`](https://github.com/nektos/act/commit/00a277d844d891a142761f67aa8eb8dabfee7573) fix: correct existing assertions ### 📊 Changes **4 files changed** (+52 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/github_context.go` (+6 -3) 📝 `pkg/model/github_context_test.go` (+3 -3) 📝 `pkg/runner/run_context.go` (+1 -1) 📝 `pkg/runner/run_context_test.go` (+42 -0) </details> ### 📄 Description The `github.ref` value should be `refs/heads/branch` in most cases. There are a few exceptions handled by the code. This change prefixes the default case with `refs/heads` and adds tests for this and the excpetional cases. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1903
No description provided.