[PR #1672] [MERGED] fix: correct ref and ref_name #2064

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1672
Author: @KnisterPeter
Created: 3/9/2023
Status: Merged
Merged: 3/9/2023
Merged by: @mergify[bot]

Base: masterHead: fix-tag-name


📝 Commits (2)

  • 9d26efb fix: correct ref and ref_name
  • c62298f test: update test data

📊 Changes

3 files changed (+20 additions, -7 deletions)

View changed files

📝 pkg/model/github_context.go (+4 -1)
📝 pkg/model/github_context_test.go (+15 -5)
📝 pkg/runner/run_context_test.go (+1 -1)

📄 Description

The ref in the GitHub context is always full qualified (e.g. refs/heads/branch, refs/tags/v1).
The ref_name is the ref with the stripped prefix.

In case of pull_requests, this is the merge commit ref (e.g. refs/pull/123/merge -> 123/merge).


🔄 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/1672 **Author:** [@KnisterPeter](https://github.com/KnisterPeter) **Created:** 3/9/2023 **Status:** ✅ Merged **Merged:** 3/9/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `fix-tag-name` --- ### 📝 Commits (2) - [`9d26efb`](https://github.com/nektos/act/commit/9d26efbb2e1cfcfeaf81e637eca3e50adde054fe) fix: correct ref and ref_name - [`c62298f`](https://github.com/nektos/act/commit/c62298f3bb5af77298a436e6563bdb3596ec66d7) test: update test data ### 📊 Changes **3 files changed** (+20 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `pkg/model/github_context.go` (+4 -1) 📝 `pkg/model/github_context_test.go` (+15 -5) 📝 `pkg/runner/run_context_test.go` (+1 -1) </details> ### 📄 Description The ref in the GitHub context is always full qualified (e.g. refs/heads/branch, refs/tags/v1). The ref_name is the ref with the stripped prefix. In case of pull_requests, this is the merge commit ref (e.g. refs/pull/123/merge -> 123/merge). --- <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:51 +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#2064
No description provided.