Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/branch-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .github/workflows/branch-guard.yml
#
# Copyright © 2025 Network Pro Strategies (Network Pro™)
# SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
# This file is part of Network Pro
#
# Warns if commits are pushed directly to master/main instead of via PR.
# Does NOT block the commit — it just posts a workflow summary and log warning.

name: Branch Guard

on:
push:
branches:
- master
- main

jobs:
warn-direct-commit:
runs-on: ubuntu-24.04
steps:
- name: Check commit source
run: |
# Only trigger warning if commit wasn't from a merge or bot
if [[ "${{ github.event.head_commit.message }}" != *"Merge pull request"* ]] && \
[[ "${{ github.actor }}" != "dependabot[bot]" ]]; then
echo "::warning ::⚠️ Direct commit to ${GITHUB_REF##*/} by $GITHUB_ACTOR."
echo "### ⚠️ Direct Commit Detected" >> $GITHUB_STEP_SUMMARY
echo "A commit was pushed directly to \`${GITHUB_REF##*/}\` by **${GITHUB_ACTOR}**." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "💡 It's recommended to use pull requests for traceability and CI validation." >> $GITHUB_STEP_SUMMARY
else
echo "✅ Merge or bot commit detected — no action needed."
fi
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,40 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en

---

## [1.24.5]

### Added

- Introduced **Branch Guard workflow** (`.github/workflows/branch-guard.yml`) to automatically enforce branch protection policies.
- Ensures consistent branch naming conventions.
- Blocks direct pushes to protected branches (e.g., `master`, `main`, and `release/*`).
- Provides early validation for pull requests and feature branches to maintain repository integrity.
- Introduced comprehensive pre-push checks for code consistency and style compliance.
- Added optional `simple-git-hooks` configuration to automate local linting before commits or pushes.
- Implemented `lint:all` script using `npm-run-all` for efficient, parallel execution of linters.
- Ensures **ESLint**, **Stylelint**, **Markdownlint**, and **Prettier** all run before code is committed, improving codebase hygiene and preventing formatting drift.
- Designed for **developer-side speed and reliability**, running linters in parallel while deferring `format` (Prettier) until after lint checks complete for safety.
- Added **hybrid linting configuration**:
- Parallel execution for static lint tasks (`eslint`, `stylelint`, `markdownlint`).
- Sequential Prettier formatting step for deterministic, race-free execution.

### Changed

- Reorganized local linting commands for clarity and consistency, consolidating redundant sequential scripts into the `lint:all` aggregator.
- Improved developer experience with faster pre-push validations and clearer script naming conventions.
- Bumped project version to `v1.24.5`.

### Developer Experience

- Enhanced local development workflow by introducing **fast, parallel linting** and **optional pre-commit hooks**, reducing turnaround time for style and quality checks.
- Simplified npm scripts for readability and maintainability by adopting `npm-run-all` as the central task runner.

### Notes

- For instructions on installing and configuring the new dependencies, please see the **[Editor Configuration](https://github.com/netwk-pro/netwk-pro.github.io/wiki/Editor-Configuration#automation)** section of the [Wiki](https://github.com/netwk-pro/netwk-pro.github.io/wiki).

---

## [1.24.4]

### Documentation
Expand Down Expand Up @@ -250,7 +284,7 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
- Updated the text of `ServicesContent.svelte`.
- Increased default Playwright test timeouts for navigation-sensitive suites (Desktop and Mobile) to improve stability under CI latency conditions.
- Implemented `Promise.all()` pattern for combined click and navigation waits, reducing flakiness in route transition tests.
- Updated the `'about' link` navigation tests in both Desktop and Mobile scenarios to include:
- Updated the `about` link navigation tests in both Desktop and Mobile scenarios to include:
- Explicit `page.waitForLoadState('domcontentloaded')` calls before assertions.
- Extended per-suite timeouts (`90s`) using `test.setTimeout(90000)` for reliability on slower environments.
- Added fallback `waitForURL('\*\*/about', { timeout: 60000 })` to ensure deterministic routing checks.
Expand Down Expand Up @@ -1481,7 +1515,8 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en

<!-- Link references -->

[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.24.4...HEAD
[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.24.5...HEAD
[1.24.5]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.24.5
[1.24.4]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.24.4
[1.24.3]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.24.3
[1.24.2]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.24.2
Expand Down
Loading
Loading