[PR #2208] [MERGED] refactor: simplify go-git cache #2323

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2208
Author: @ChristopherHX
Created: 2/6/2024
Status: Merged
Merged: 2/18/2024
Merged by: @mergify[bot]

Base: masterHead: refactor-simplify-go-git-action-cache


📝 Commits (2)

  • d393dbc refactor: simpilfy go-git cache
  • 2d3e685 Merge branch 'master' into refactor-simplify-go-git-action-cache

📊 Changes

2 files changed (+59 additions, -48 deletions)

View changed files

📝 pkg/runner/action_cache.go (+3 -32)
📝 pkg/runner/action_cache_test.go (+56 -16)

📄 Description

Doing a refs/*/ fetch seems unnecassary, short shas are rejected by the git protocol.

This fixes using HEAD as action version and let git decide to prefer tag over branch name using short form

Also reduces complexity.

Fixes #2206

Includes extended test cases and no longer fetches a repository from my account.


🔄 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/2208 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 2/6/2024 **Status:** ✅ Merged **Merged:** 2/18/2024 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `refactor-simplify-go-git-action-cache` --- ### 📝 Commits (2) - [`d393dbc`](https://github.com/nektos/act/commit/d393dbc086257b7e8f51692adb5af97fb86b05a1) refactor: simpilfy go-git cache - [`2d3e685`](https://github.com/nektos/act/commit/2d3e685ab5b28d9c51a32781930f4c7f321699f8) Merge branch 'master' into refactor-simplify-go-git-action-cache ### 📊 Changes **2 files changed** (+59 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/action_cache.go` (+3 -32) 📝 `pkg/runner/action_cache_test.go` (+56 -16) </details> ### 📄 Description Doing a `refs/*/` fetch seems unnecassary, short shas are rejected by the git protocol. This fixes using `HEAD` as action version and let git decide to prefer tag over branch name using short form Also reduces complexity. Fixes #2206 Includes extended test cases and no longer fetches a repository from my account. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:57 +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#2323
No description provided.