Repository navigation
refactor: make shared message functions reusable - #85
Closed
k-alphonse wants to merge 2 commits into
Closed
k-alphonse wants to merge 2 commits into
k-alphonse wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused refactor preserves existing behavior and satisfies the stated reuse and documentation requirements.
Review effort: Balanced
Findings: None
What changed in this PR
Extracts reusable shell messaging functions while preserving existing terminal behavior and documenting standalone usage.
Changes:
- Adds a standalone message-function module.
- Loads it safely from Bash and Zsh.
- Documents script and container usage.
| File | Description |
|---|---|
src/bash/messages |
Defines shared message functions. |
src/bash/functions |
Sources messages using shell-specific paths. |
README.md |
Documents usage and verification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
k-alphonse
enabled auto-merge
October 2, 2026 19:58
Explain and narrowly suppress the Bash-only diagnostic for the guarded Zsh expansion. Mark the shared message file executable to match the repository lint convention. Allow only the lint job to read contents and publish commit statuses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope review — 2 October 2026
Closed without merging after the supervisor clarified the requirement. The existing
msgfunction already supportsinfo,ok,warn,fail, and notice messages. Hierarchies' current CI messages use these existing categories, so no missing message type has been identified. Extracting the functions into a new file is not required for this task. Reuse the existing functions in the consumer; add a category only when a concrete missing requirement is established.🥇 Generic Pull Request 🥇
Elizabeth Consulting International Inc
Purpose & Objective
This PR makes the existing colored-message functions reusable in shell scripts and CI pipelines.
These functions currently live in
src/bash/functions, which also performs terminal setup. Separating them allows scripts such as Hierarchies’ CI runner to load only the messaging functions and share the company’s existing output format.Changes
msg,emsg,kmsg,imsg, andwmsgintosrc/bash/messages.src/bash/functionsto load the shared file in both Bash and Zsh.Testing
The following checks passed against the prepared changes:
messagesdirectly produces no output or terminal setup.functionsfile works from another working directory, including when the checkout path contains spaces.Repository linting and Docker integration have not been run. Updating Hierarchies to consume the shared functions is a separate follow-up.
Closes #84.