[PR #434] [MERGED] Fix tests if there are hooks generated by templates #1449

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/434
Author: @lufia
Created: 11/30/2020
Status: Merged
Merged: 1/12/2021
Merged by: @cplee

Base: masterHead: clean-custom-hooks


📝 Commits (2)

  • 4f927fd Fix tests if there are hooks generated by templates
  • 5541806 Merge branch 'master' into clean-custom-hooks

📊 Changes

1 file changed (+24 additions, -0 deletions)

View changed files

📝 pkg/common/git_test.go (+24 -0)

📄 Description

If there are custom hooks in ~/.git_template/hooks, they can occur an error on such as pre-commit hooks.

I have a pre-commit hook in the template dir:

function must()
{
	local v=$(git config --get $1)
	if ! [[ $v = $2 ]]
	then
		echo >&2 "$1=$v: must match $2"
		exit 1
	fi
}

must user.name xxx
must user.email xxx@example.com

🔄 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/434 **Author:** [@lufia](https://github.com/lufia) **Created:** 11/30/2020 **Status:** ✅ Merged **Merged:** 1/12/2021 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `clean-custom-hooks` --- ### 📝 Commits (2) - [`4f927fd`](https://github.com/nektos/act/commit/4f927fdb1ea8cc2e9d3bdd5c1df14ee6c14371e1) Fix tests if there are hooks generated by templates - [`5541806`](https://github.com/nektos/act/commit/5541806e26f97924572e15bbfd8aab1a813a06aa) Merge branch 'master' into clean-custom-hooks ### 📊 Changes **1 file changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/common/git_test.go` (+24 -0) </details> ### 📄 Description If there are custom hooks in ~/.git_template/hooks, they can occur an error on such as pre-commit hooks. I have a **pre-commit** hook in the template dir: ```sh function must() { local v=$(git config --get $1) if ! [[ $v = $2 ]] then echo >&2 "$1=$v: must match $2" exit 1 fi } must user.name xxx must user.email xxx@example.com ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:13 +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#1449
No description provided.