[PR #1422] [CLOSED] WIP: Github Actions: Fix "Get changed files" in Shellcheck workflow #3047

Closed
opened 2026-02-05 05:26:12 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/1422
Author: @andygrunwald
Created: 1/11/2025
Status: Closed

Base: mainHead: fix-shellcheck-ci


📝 Commits (7)

  • 26f0b33 Github Actions: Fix "Get changed files" in Shellcheck workflow
  • f312f9b Shell script changed, to trigger shellcheck
  • 6d76b7e GitHub Actions: Limit changed files on *.sh files
  • 836ed42 Github Actions Workflow: Changed files only for *.sh files
  • ae4aaaf Fix Changed files detection
  • 51f9a59 Removed xargs
  • 5cb0350 Install Shellcheck

📊 Changes

1 file changed (+30 additions, -7 deletions)

View changed files

📝 .github/workflows/shellcheck.yml (+30 -7)

📄 Description

✍️ Description

The Shellcheck GitHub Action workflow is not running. It throws an error in the "Get changed files" step:

Run if true; then
fatal: ambiguous argument 'HEAD^1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

See https://github.com/community-scripts/ProxmoxVE/actions/runs/12724031265/job/35469760341

This Pull Request is using the same "Get changes files" logic from another workflow: cc40b5957d/.github/workflows/validate-filenames.yml (L36-L43)

Work in Progress!

This Pull Request is work in progress as the testing can only be done via Github actions.
I will comment, once this is ready.


🛠️ Type of Change

  • 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

  • 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)

An alternative would be to use https://github.com/marketplace/actions/changed-files instead of custom crafted shell scripts.


🔄 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/1422 **Author:** [@andygrunwald](https://github.com/andygrunwald) **Created:** 1/11/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-shellcheck-ci` --- ### 📝 Commits (7) - [`26f0b33`](https://github.com/community-scripts/ProxmoxVE/commit/26f0b33b46ec9f106b6c305bcaa90cd25e794606) Github Actions: Fix "Get changed files" in Shellcheck workflow - [`f312f9b`](https://github.com/community-scripts/ProxmoxVE/commit/f312f9b2204b41f51d58cc9cbfc604edbc59c0db) Shell script changed, to trigger shellcheck - [`6d76b7e`](https://github.com/community-scripts/ProxmoxVE/commit/6d76b7ef9cd1017ea7f96a99d61981fb208d49be) GitHub Actions: Limit changed files on *.sh files - [`836ed42`](https://github.com/community-scripts/ProxmoxVE/commit/836ed422c04d238ec698c53a3ac2884164289056) Github Actions Workflow: Changed files only for *.sh files - [`ae4aaaf`](https://github.com/community-scripts/ProxmoxVE/commit/ae4aaafb765ea91f6c2a871086269a542acbe19c) Fix Changed files detection - [`51f9a59`](https://github.com/community-scripts/ProxmoxVE/commit/51f9a5984eb70f7ac90e66673b9cfc5a9c8bbda9) Removed xargs - [`5cb0350`](https://github.com/community-scripts/ProxmoxVE/commit/5cb03509cfeffae1e60002a802f4195b4c73d1af) Install Shellcheck ### 📊 Changes **1 file changed** (+30 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/shellcheck.yml` (+30 -7) </details> ### 📄 Description ## ✍️ Description The Shellcheck GitHub Action workflow is not running. It throws an error in the "Get changed files" step: ```sh Run if true; then fatal: ambiguous argument 'HEAD^1': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' ``` See https://github.com/community-scripts/ProxmoxVE/actions/runs/12724031265/job/35469760341 This Pull Request is using the same "Get changes files" logic from another workflow: https://github.com/community-scripts/ProxmoxVE/blob/cc40b5957d6fc96441875b9c61b4d116a4825b49/.github/workflows/validate-filenames.yml#L36-L43 ### Work in Progress! This Pull Request is work in progress as the testing can only be done via Github actions. I will comment, once this is ready. --- ## 🛠️ Type of Change - [X] 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 - [X] 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) An alternative would be to use https://github.com/marketplace/actions/changed-files instead of custom crafted shell scripts. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 05:26:12 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#3047