[PR #1920] [MERGED] Add new CLI flag to log just the job id and not the entire job name #2192

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1920
Author: @ImTomEddy
Created: 7/19/2023
Status: Merged
Merged: 7/19/2023
Merged by: @mergify[bot]

Base: masterHead: #1821/hide-workflow-and-job-names-from-logs


📝 Commits (2)

  • 6059153 Add new CLI flag to log just the job id and not the entire job name
  • d6f313d Up the action test timeout to 20m from 15m

📊 Changes

5 files changed (+30 additions, -10 deletions)

View changed files

📝 .github/actions/run-tests/action.yml (+1 -1)
📝 cmd/input.go (+1 -0)
📝 cmd/root.go (+2 -0)
📝 pkg/runner/logger.go (+25 -9)
📝 pkg/runner/runner.go (+1 -0)

📄 Description

Log messages can already be fairly long which is exacerbated by the prefix, however the prefix is useful when running multiple jobs within a single act pipeline. The compromise in this PR is to allow for a shorter prefix using just the job ID, which is user configurable.

The flag chosen is intentionally verbose.

--log-prefix-job-id

Sample output without the flag

[call-workflow/Run In Container/run-in-container] [DEBUG] evaluating expression 'success()'
[call-workflow/Run In Container/run-in-container] [DEBUG] expression 'success()' evaluated to 'true'
[call-workflow/Run In Container/run-in-container] [DEBUG] Loading revision from git directory

Sample output with the flag

[run-in-container] [DEBUG] evaluating expression 'success()'
[run-in-container] [DEBUG] expression 'success()' evaluated to 'true'
[run-in-container] [DEBUG] Loading revision from git directory

Closes https://github.com/nektos/act/issues/1821


🔄 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/1920 **Author:** [@ImTomEddy](https://github.com/ImTomEddy) **Created:** 7/19/2023 **Status:** ✅ Merged **Merged:** 7/19/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `#1821/hide-workflow-and-job-names-from-logs` --- ### 📝 Commits (2) - [`6059153`](https://github.com/nektos/act/commit/6059153bc117994287368cc033e671b4a374d434) Add new CLI flag to log just the job id and not the entire job name - [`d6f313d`](https://github.com/nektos/act/commit/d6f313def66136c8306d31e76c444d56b51aeb12) Up the action test timeout to 20m from 15m ### 📊 Changes **5 files changed** (+30 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/run-tests/action.yml` (+1 -1) 📝 `cmd/input.go` (+1 -0) 📝 `cmd/root.go` (+2 -0) 📝 `pkg/runner/logger.go` (+25 -9) 📝 `pkg/runner/runner.go` (+1 -0) </details> ### 📄 Description Log messages can already be fairly long which is exacerbated by the prefix, however the prefix is useful when running multiple jobs within a single act pipeline. The compromise in this PR is to allow for a shorter prefix using just the job ID, which is user configurable. The flag chosen is intentionally verbose. ```bash --log-prefix-job-id ``` Sample output without the flag ```bash [call-workflow/Run In Container/run-in-container] [DEBUG] evaluating expression 'success()' [call-workflow/Run In Container/run-in-container] [DEBUG] expression 'success()' evaluated to 'true' [call-workflow/Run In Container/run-in-container] [DEBUG] Loading revision from git directory ``` Sample output with the flag ```bash [run-in-container] [DEBUG] evaluating expression 'success()' [run-in-container] [DEBUG] expression 'success()' evaluated to 'true' [run-in-container] [DEBUG] Loading revision from git directory ``` Closes https://github.com/nektos/act/issues/1821 --- <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:23 +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#2192
No description provided.