[PR #1257] [MERGED] ci: combine header checks into workflow with PR comment #3081

Closed
opened 2026-02-26 13:32:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/1257
Author: @se-bastiaan
Created: 1/5/2025
Status: Merged
Merged: 1/6/2025
Merged by: @MickLesk

Base: mainHead: chore/post-comment-from-header-checks


📝 Commits (3)

  • 1bbd26a Combine all headers checks into workflow with steps that end with a PR comment
  • ee8b218 Test
  • fc803ad Change name because it is more than headers

📊 Changes

3 files changed (+214 additions, -109 deletions)

View changed files

.github/check-script.yml (+0 -54)
.github/workflows/check-metadata.yml (+0 -55)
.github/workflows/validate-scripts.yml (+214 -0)

📄 Description

✍️ Description

This pull request include changes to the GitHub Actions workflows for validating shell scripts.

Consolidation of validation workflows:

  • .github/check-script.yml: Removed the workflow that checked shell scripts for specific lines and executable permissions. This workflow was in the wrong folder and therefore never executed.
  • .github/workflows/check-metadata.yml: Removed the workflow that checked metadata lines in shell scripts. This workflow uses the wrong paths and was therefore never executed.

Introduction of a new validation workflow:

This pull request consolidates and improves the script validation workflows by combining multiple checks into a single comprehensive validation workflow. The changes remove redundant workflows and introduce a new workflow that performs various checks on shell scripts.

Consolidation of script validation workflows:

  • .github/workflows/validate-scripts.yml: Added a new workflow that performs multiple checks on shell scripts, including:
    • Validating the presence and correctness of the source line.
    • Checking for executable permissions.
    • Ensuring the presence and correctness of metadata headers (copyright, author, license, and source).
    • Posting results and comments on pull requests.

It might be good to note that a lot of files to not comply with the checks in this workflow. So any new PRs will fail and should be fixed before merging.

Like #1239 the comment placed by the workflow has start and end tags, to make it possible to add more information to a single comment from other workflows. In code it looks like:

<!-- validate-scripts-start -->
### Script validation

:rocket: All changed shell scripts passed validation!


<!-- validate-scripts-end -->

Please remove unneeded lines!

  • Related Issue: # (issue number, if applicable)
  • Related PR: # (if applicable)
  • Related Discussion: (if applicable)

🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)

Scherm­afbeelding 2025-01-05 om 14 30 23

Tested in https://github.com/se-bastiaan/ProxmoxVE/pull/2


🔄 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/community-scripts/ProxmoxVE/pull/1257 **Author:** [@se-bastiaan](https://github.com/se-bastiaan) **Created:** 1/5/2025 **Status:** ✅ Merged **Merged:** 1/6/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `chore/post-comment-from-header-checks` --- ### 📝 Commits (3) - [`1bbd26a`](https://github.com/community-scripts/ProxmoxVE/commit/1bbd26a95492712f20c8b5f8e8ccc55ae5b23108) Combine all headers checks into workflow with steps that end with a PR comment - [`ee8b218`](https://github.com/community-scripts/ProxmoxVE/commit/ee8b2185f92f0da5203ed946a63028077a0f3221) Test - [`fc803ad`](https://github.com/community-scripts/ProxmoxVE/commit/fc803ad08905b2b1c8a7c1a7a201ff612683156c) Change name because it is more than headers ### 📊 Changes **3 files changed** (+214 additions, -109 deletions) <details> <summary>View changed files</summary> ➖ `.github/check-script.yml` (+0 -54) ➖ `.github/workflows/check-metadata.yml` (+0 -55) ➕ `.github/workflows/validate-scripts.yml` (+214 -0) </details> ### 📄 Description ## ✍️ Description This pull request include changes to the GitHub Actions workflows for validating shell scripts. Consolidation of validation workflows: * [`.github/check-script.yml`](diffhunk://#diff-e24d0d3780cfbf191e445239d72e6d1a75e54edee511e989215d22f4dc0c4361L1-L54): Removed the workflow that checked shell scripts for specific lines and executable permissions. This workflow was in the wrong folder and therefore never executed. * [`.github/workflows/check-metadata.yml`](diffhunk://#diff-304a27bbc9ec1efc4a85d0bc618862b75d692294fb4b6d66675a0403aa2bf53dL1-L55): Removed the workflow that checked metadata lines in shell scripts. This workflow uses the wrong paths and was therefore never executed. Introduction of a new validation workflow: This pull request consolidates and improves the script validation workflows by combining multiple checks into a single comprehensive validation workflow. The changes remove redundant workflows and introduce a new workflow that performs various checks on shell scripts. ### Consolidation of script validation workflows: * `.github/workflows/validate-scripts.yml`: Added a new workflow that performs multiple checks on shell scripts, including: - Validating the presence and correctness of the `source` line. - Checking for executable permissions. - Ensuring the presence and correctness of metadata headers (copyright, author, license, and source). - Posting results and comments on pull requests. **It might be good to note that a lot of files to not comply with the checks in this workflow. So any new PRs will fail and should be fixed before merging.** Like #1239 the comment placed by the workflow has start and end tags, to make it possible to add more information to a single comment from other workflows. In code it looks like: ``` <!-- validate-scripts-start --> ### Script validation :rocket: All changed shell scripts passed validation! <!-- validate-scripts-end --> ``` - - - **_Please remove unneeded lines!_** - Related Issue: # (issue number, if applicable) - Related PR: # (if applicable) - Related Discussion: []()(if applicable) --- ## 🛠️ Type of Change Please check the relevant options: - [ ] Bug fix (non-breaking change that resolves an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts) --- ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [x] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [x] Testing performed (I have thoroughly tested my changes and verified expected functionality.) - [ ] Documentation updated (I have updated any relevant documentation) --- ## 📋 Additional Information (optional) ![Scherm­afbeelding 2025-01-05 om 14 30 23](https://github.com/user-attachments/assets/16b67937-d3c1-4de2-b197-e61bdd78f222) Tested in https://github.com/se-bastiaan/ProxmoxVE/pull/2 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 13:32:21 +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/ProxmoxVE#3081
No description provided.