openwrt / openwrt/actions-shared-workflows
openwrt/luci: Convert 'should be <= xx characters long' output to Markdown
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 12
- Forks
- 29
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 2
Description
I've noticed that when a user does go over the character limit, the output shown to the user is a little confusing as the formatting code is not understood by Markdown:
Actual: line 2 is 136 characters long
$\textsf{Extend the port status view to include dynamically detected ethernet interf\color{red}{aces (e.g. USB adapters) in addition to board-defined ports.
}}$
Actual: line 4 is 153 characters long
$\textsf{Devices are derived from netifd's device map (port_map) and merged into the\color{red}{ existing port list if not already present. Loopback interfaces are excluded.
}}$
Actual: line 6 is 201 characters long
$\textsf{To ensure correct hotplug behaviour, the device list is filtered against th\color{red}{e current kernel device list obtained via /sys/class/net, preventing stale entries from being displayed after device removal.
}}$
If there was a way to convert that output to a Markdown friendly format, it may be easier for users to quickly see the error. Example converted output, using **~~ and ~~**:
Actual: line 2 is 136 characters long:
Extend the port status view to include dynamically detected ethernet interf aces (e.g. USB adapters) in addition to board-defined ports.
Actual: line 4 is 153 characters long:
Devices are derived from netifd's device map (port_map) and merged into the existing port list if not already present. Loopback interfaces are excluded.
Actual: line 6 is 201 characters long:
To ensure correct hotplug behaviour, the device list is filtered against th e current kernel device list obtained via /sys/class/net, preventing stale entries from being displayed after device removal.
Things to consider though:
- If the actual commit content contains a slash, the Markdown will not be applied due to
**~~must be added right before a character that isn't empty (space) or a slash/, and~~**must be added right after a character that isn't empty (space).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the workflow or helper that emits the “should be <= xx characters long” output, then inspect how the current LaTeX-style formatting is assembled. Reproduce the examples from the issue and verify that the converted output handles spaces, slashes, and line breaks as described; done means the resulting messages render correctly as Markdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100