github / github/platform-samples

Pre-receive hook output prefix

Open
#272 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
2.2k
Forks
1.9k
Avg merge
7d 19h
Merged PRs (30d)
1

Description

Hi, in an organisation with many pre-receive hooks running, it would be great if the hook was executed with each stdout line being pre-fixed with the hook that caused the line output.

Like what is shown here: https://superuser.com/a/623119/860394

```bash
command1.sh | sed "s/^/[command1] /"
command2.sh | sed "s/^/[command2] /"
```

For hook maintainers, it is time consuming to constantly address questions about issues related to other hooks created by other teams within an organisation.

Edit:

per-hook solutions are welcome, though a GitHub-wide solution would be ideal.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the pre-receive hook context and the command1.sh/command2.sh piping example in the issue. Determine whether a per-hook wrapper can meet the request or whether it requires a GitHub-wide platform change; done means documenting and implementing an agreed prefixing approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.