Skip to content

Update pr-checks.yml - #107

Open
groupthinking wants to merge 5 commits into
mainfrom
copilot/add-workflow-files
Open

Update pr-checks.yml#107
groupthinking wants to merge 5 commits into
mainfrom
copilot/add-workflow-files

Conversation

@groupthinking

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI and others added 5 commits January 29, 2026 18:35
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
…ate glob patterns

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 22:41
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough
  • Added path-based PR labeling for documentation, source, configuration, and workflow changes.
  • Added automatic PR labeling and needs-triage labeling for newly opened issues.
  • Added PR checks for main pull requests and pushes, including Node.js 18 setup, dependency installation, and build execution.

Walkthrough

Added GitHub Actions automation for path-based pull request labels, automatic needs-triage labels on opened issues, and Node.js build checks on pull requests and pushes to main.

Changes

Repository Automation

Layer / File(s) Summary
Path-based pull request labeling
.github/labeler.yml, .github/workflows/auto-label.yml
Maps changed paths to labels and runs actions/labeler@v5 for pull request events. The workflow contains duplicated with: configuration.
Issue triage labeling
.github/workflows/issue-triage.yml
Uses actions/github-script@v7 to apply needs-triage when an issue is opened.
Pull request build checks
.github/workflows/pr-checks.yml
Checks out the repository, configures Node.js 18 with npm caching, installs dependencies, and runs the build for pull requests and pushes to main.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: copilot-rabbit

Suggested reviewers: copilot

Poem

YAML alarms begin to ring,
Labels march on every string.
Issues queue with triage tags,
Builds inspect the branching flags.
Duplicate keys lurk in the night.

🚥 Pre-merge checks | ✅ 4 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Enforce Copilot Verification ⚠️ Warning Copilot reviewed PR 107, but the only Copilot review is COMMENTED, not APPROVED, so the gate fails. Get an explicit APPROVED review from copilot-pull-request-reviewer[bot]; human approvals do not count.
Require Ai Unit Tests ⚠️ Warning FAIL: the PR only adds workflow/label files; no unit test files were committed, and 'copilot-rabbit' appears nowhere in the repo. Add the copilot-rabbit label in repo settings/config and commit the AI-generated unit tests alongside the code changes.
Description check ❓ Inconclusive No description was provided, so there is nothing meaningful to verify against the changes. Add a short summary of the new labeler, issue triage, and PR check workflows.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is related to the changes, but it only names one workflow while the PR also adds other automation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/add-workflow-files
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch copilot/add-workflow-files

Warning

Review ran into problems

🔥 Problems

These MCP integrations need to be re-authenticated in the Integrations settings: Sentry


Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GitHub Actions automation to the repository to (1) run a basic Node/TypeScript build on PRs and main pushes, and (2) automate labeling for PRs and newly opened issues.

Changes:

  • Add a PR build workflow that runs npm ci and npm run build.
  • Add an issue-triage workflow that applies a needs-triage label to new issues.
  • Add PR auto-labeling via actions/labeler plus a .github/labeler.yml ruleset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-checks.yml Introduces a CI job to install dependencies and build on PRs/pushes to main.
.github/workflows/issue-triage.yml Adds automation to label newly opened issues with needs-triage.
.github/workflows/auto-label.yml Adds PR labeling workflow using actions/labeler (currently has a YAML issue to fix).
.github/labeler.yml Defines label rules mapping file globs to labels (documentation/source/config/workflows).

Comment on lines +19 to +23
uses: actions/labeler@v5
with:
sync-labels: true
with:
sync-labels: true
Comment on lines +15 to +17
- name: Checkout repository
uses: actions/checkout@v4

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/labeler.yml:
- Around line 4-26: Ensure the labels referenced by the labeler
configuration—source, config, and workflows—are available by pre-creating them
in the repository or granting the auto-label workflow issues: write permission
in .github/workflows/auto-label.yml; retain pull-requests: write as needed,
since it does not permit label creation.

In @.github/workflows/auto-label.yml:
- Around line 18-23: Remove the duplicate with mapping in the “Label PR based on
files changed” step using actions/labeler@v5, keeping a single with block
containing sync-labels: true so the workflow parses and runs correctly.
- Around line 3-19: Remove the duplicate with: mapping from the
actions/labeler@v5 step in the label job, retaining a single with: block
containing sync-labels: true so the workflow remains valid.
- Around line 18-19: Update the “Label PR based on files changed” workflow step
to use a supported major version of actions/labeler instead of v5, and pin the
action reference to its specific commit SHA rather than a mutable tag.

In @.github/workflows/issue-triage.yml:
- Line 15: Update the actions/github-script step to reference its exact commit
SHA instead of the mutable `@v7` tag, while preserving the existing workflow
behavior and permissions.
- Line 22: Create the needs-triage repository label before the
actions/github-script step that uses labels: ['needs-triage'], either by adding
it to repository settings or by bootstrapping it in the workflow. Ensure the
existing issue-triage labeling flow only calls addLabels after confirming the
label exists.

In @.github/workflows/pr-checks.yml:
- Around line 3-7: Add a workflow-level concurrency configuration to the PR
checks workflow, using a group keyed by the pull request number or ref and
enabling cancel-in-progress. Keep the existing pull_request and push triggers
unchanged so newer runs cancel only their corresponding stale builds.
- Around line 17-21: Pin every referenced third-party action to its full commit
SHA instead of mutable tags: update actions/checkout and actions/setup-node in
.github/workflows/pr-checks.yml (17-21), actions/labeler in
.github/workflows/auto-label.yml (15-19), and actions/github-script in
.github/workflows/issue-triage.yml; retain each action’s existing version as an
inline comment for traceability.
- Around line 17-18: Update the actions/checkout@v4 step in the workflow to set
persist-credentials to false, ensuring the PR-controlled npm ci and npm run
build steps cannot access persisted checkout credentials.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3c066c6d-1d8b-40ab-97f6-4a4c9a9c2091

📥 Commits

Reviewing files that changed from the base of the PR and between 8005bb6 and 1870635.

📒 Files selected for processing (4)
  • .github/labeler.yml
  • .github/workflows/auto-label.yml
  • .github/workflows/issue-triage.yml
  • .github/workflows/pr-checks.yml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • groupthinking/uvai-skills (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: copilot-pull-request-reviewer
🧰 Additional context used
🪛 actionlint (1.7.12)
.github/workflows/auto-label.yml

[error] 22-22: key "with" is duplicated in element of "steps" section. previously defined at line:20,col:9

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/auto-label.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 22-22: duplication of key "with" in mapping

(key-duplicates)

🪛 zizmor (1.26.1)
.github/workflows/issue-triage.yml

[error] 8-8: overly broad permissions (excessive-permissions): issues: write is overly broad at the workflow level

(excessive-permissions)


[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 8-8: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 11-11: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-5: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/pr-checks.yml

[warning] 17-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 21-21: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 13-13: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

🔍 Remote MCP

Useful review context

  • PR 107 is open, currently dirty, and changes 4 files: .github/labeler.yml, .github/workflows/auto-label.yml, .github/workflows/issue-triage.yml, and .github/workflows/pr-checks.yml (+102/−0, 5 commits, 1 existing bot comment). citeGitHub Copilot::pull_request_read::GitHub Copilot::get_comments::

  • The repo is npm/TypeScript-based: package.json has build: tsc plus start, dev, clean, and examples; there is no test script, and package-lock.json is present. citeGitHub Copilot::get_file_contents::

  • Label lookups show documentation exists, but needs-triage, source, config, and workflows were not found. The PR adds .github/labeler.yml that defines those label names, and issue-triage.yml adds needs-triage. citeGitHub Copilot::get_label::GitHub Copilot::pull_request_read::

  • The auto-label.yml diff includes a duplicated with: block under the actions/labeler@v5 step. citeGitHub Copilot::pull_request_read::

🔇 Additional comments (2)
.github/workflows/pr-checks.yml (1)

20-24: 🔒 Security & Privacy

Don’t bump CI to 24.x here. This repo still documents and ships Node 18 (DEPLOYMENT.md, Dockerfile), so changing only .github/workflows/pr-checks.yml would just desync CI from the actual runtime contract. If Node 18 is dead, fix the app/runtime docs and deployment image with the CI change.

			> Likely an incorrect or invalid review comment.
.github/workflows/issue-triage.yml (1)

1-8: LGTM!

Also applies to: 10-14, 16-21, 23-24

Comment thread .github/labeler.yml
Comment on lines +4 to +26
documentation:
- changed-files:
- any-glob-to-any-file:
- '*.md'
- 'docs/**'

source:
- changed-files:
- any-glob-to-any-file:
- 'src/**'

config:
- changed-files:
- any-glob-to-any-file:
- '*.json'
- '**/*.yml'
- '**/*.yaml'
- '.env*'

workflows:
- changed-files:
- any-glob-to-any-file:
- '.github/**'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== .github/labeler.yml ==\n'
cat -n .github/labeler.yml

printf '\n== .github/workflows/auto-label.yml ==\n'
cat -n .github/workflows/auto-label.yml

printf '\n== label definitions in repo ==\n'
rg -n --hidden --glob '!.git' --glob '!node_modules' --glob '!dist' --glob '!build' '^(source|config|workflows):|name:\s*(source|config|workflows)\b|labels:' .github . || true

printf '\n== workflow uses of labeler/label creation ==\n'
rg -n --hidden --glob '!.git' --glob '!node_modules' 'peter-evans/create-or-update-comment|actions-ecosystem/action-add-labels|gh label|create labels|labels:' .github/workflows .github || true

Repository: groupthinking/MyXstack

Length of output: 2640


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' .github/workflows/auto-label.yml
printf '\n---\n'
sed -n '1,120p' .github/labeler.yml
printf '\n---\n'
find .github -maxdepth 2 -type f | sort

Repository: groupthinking/MyXstack

Length of output: 1241


🏁 Script executed (no clone):

#!/bin/bash
set -euo pipefail

repo='groupthinking/MyXstack'

printf '== repo labels ==\n'
curl -fsSL "https://api.github.com/repos/$repo/labels?per_page=100" | jq -r '.[].name' | sort || true

printf '\n== auto-label workflow ==\n'
curl -fsSL "https://raw.githubusercontent.com/$repo/HEAD/.github/workflows/auto-label.yml" | sed -n '1,120p' || true

printf '\n== labeler file ==\n'
curl -fsSL "https://raw.githubusercontent.com/$repo/HEAD/.github/labeler.yml" | sed -n '1,120p' || true

Length of output: 2412


🏁 Script executed:

#!/bin/bash
set -euo pipefail

nl -ba .github/workflows/auto-label.yml | sed -n '1,80p'

Repository: groupthinking/MyXstack

Length of output: 200


🌐 Web query:

GitHub actions/labeler permissions issues write add labels pull request GITHUB_TOKEN

💡 Result:

The error HttpError: Resource not accessible by integration when using the GitHub labeler action is a common issue caused by the restricted permissions of the GITHUB_TOKEN when triggered by pull requests from forked repositories [1][2][3]. By design, GitHub restricts the GITHUB_TOKEN to read-only access for workflows triggered by the pull_request event originating from a fork [1][4]. This security measure prevents malicious PR authors from gaining write access to the base repository [4]. Consequently, even if you explicitly grant write permissions in your workflow, the token remains read-only for these events [3]. To resolve this issue, you should use the pull_request_target event instead of pull_request [5][1][3]. The pull_request_target event runs in the context of the base repository, which allows the GITHUB_TOKEN to have the necessary write permissions even for PRs from forks [1][3]. To correctly configure your workflow, ensure your permissions block is set to include write access for both pull-requests and issues [6][5]: permissions: contents: read pull-requests: write issues: write on: pull_request_target: types: [opened, synchronize, reopened] When using pull_request_target, exercise caution because this event has access to the repository's secrets and write permissions [7][8]. The labeler action is generally considered safe for this event because it does not execute code from the pull request, but you should always ensure your workflows are designed securely to avoid executing untrusted code [7][5]. If you still encounter permission issues within the base repository itself, ensure the job specifically includes the permissions block shown above, as the action requires write access to the issues API to manage labels [6][5].

Citations:


🌐 Web query:

GitHub Actions labeler action permissions issues write pull-requests write

💡 Result:

To successfully use the GitHub Actions Labeler, you must configure appropriate permissions in your workflow file depending on your requirements [1][2][3]. Required Permissions The following permissions are recommended for the GITHUB_TOKEN to ensure the action functions correctly: permissions: contents: read pull-requests: write issues: write Breakdown of requirements: - pull-requests: write: This is required for adding existing labels to a pull request [1][2][3]. - issues: write: This is necessary if the action needs to create new labels that do not already exist in the repository [1][2][3]. If you prefer not to grant this, you must manually create all required labels in your repository before the action runs [1][2][3]. Troubleshooting Permission Issues If you encounter a Resource not accessible by integration error, it is often due to security restrictions on pull requests triggered from forked repositories [1][3][4]. By default, GitHub limits the GITHUB_TOKEN to read-only access for workflows triggered by the pull_request event from a fork [1][3][4]. To resolve this, change your workflow trigger from pull_request to pull_request_target [1][2][4]. Using pull_request_target runs the workflow in the context of the base repository and grants the GITHUB_TOKEN write access, allowing the labeler to function correctly [1][3][4]. Note that you should exercise caution when using pull_request_target, as it executes with the permissions of the base repository and can access repository secrets [3]. Ensure your workflow is designed to avoid executing untrusted code from the fork [1][3].

Citations:


🌐 Web query:

site:docs.github.com actions/labeler permissions pull-requests write issues write

💡 Result:

When using the official actions/labeler action in a GitHub Actions workflow, the necessary permissions depend on the objects you are labeling. Because GitHub treats pull requests as a type of issue in its API, the GITHUB_TOKEN requires the issues: write permission to apply labels to issues and the pull-requests: write permission to apply labels to pull requests [1][2]. Specifically, if you are configuring a workflow to label pull requests, you must include the following permissions in your job configuration [1][2]: permissions: pull-requests: write contents: read If your workflow also needs to label issues, you must add the issues: write permission [3][4]: permissions: issues: write pull-requests: write contents: read It is a security best practice to explicitly define these permissions in your workflow file rather than relying on default settings, as this adheres to the principle of least privilege [5][6]. When the permissions key is explicitly defined, all unspecified permissions are set to no access (with the exception of metadata, which is always granted read access) [6].

Citations:


Add the missing repo labels or grant label-creation access. source, config, and workflows are referenced in .github/labeler.yml, but they don’t exist in the repo. actions/labeler won’t apply them unless you pre-create them or add issues: write; pull-requests: write alone doesn’t cover label creation.

📍 Affects 2 files
  • .github/labeler.yml#L4-L26 (this comment)
  • .github/workflows/auto-label.yml#L7-L9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/labeler.yml around lines 4 - 26, Ensure the labels referenced by the
labeler configuration—source, config, and workflows—are available by
pre-creating them in the repository or granting the auto-label workflow issues:
write permission in .github/workflows/auto-label.yml; retain pull-requests:
write as needed, since it does not permit label creation.

Source: MCP tools

Comment on lines +3 to +19
on:
pull_request:
types: [opened, edited, synchronize]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Label PR based on files changed
uses: actions/labeler@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .github/workflows/auto-label.yml ---'
cat -n .github/workflows/auto-label.yml

Repository: groupthinking/MyXstack

Length of output: 781


Remove the duplicate with: block. There are two with: mappings under actions/labeler@v5; keep one sync-labels: true block or the workflow becomes invalid.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 3-3: truthy value should be one of [false, true]

(truthy)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-label.yml around lines 3 - 19, Remove the duplicate
with: mapping from the actions/labeler@v5 step in the label job, retaining a
single with: block containing sync-labels: true so the workflow remains valid.

Comment on lines +18 to +19
- name: Label PR based on files changed
uses: actions/labeler@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- workflow ---\n'
cat -n .github/workflows/auto-label.yml

printf '\n--- labeler references ---\n'
rg -n "actions/labeler|labeler@v|node 20|node20|pin" .github/workflows .github -S || true

Repository: groupthinking/MyXstack

Length of output: 251


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- .github/workflows/auto-label.yml ---'
cat -n .github/workflows/auto-label.yml

echo
echo '--- references under .github ---'
rg -n "actions/labeler|labeler@v|node 20|node20|commit SHA|sha" .github -S || true

Repository: groupthinking/MyXstack

Length of output: 973


🌐 Web query:

GitHub actions/labeler v5 Node.js 20 runtime EOL v6 supported major

💡 Result:

The actions/labeler GitHub Action has progressed beyond version 5 [1]. Version 5 of the action utilized the Node.js 20 runtime [2][3]. As of today, July 24, 2026, version 6 of actions/labeler is available and fully supported [4][1]. This version upgraded the underlying runtime from Node.js 20 to Node.js 24 [4][5]. Regarding the Node.js 20 runtime environment on GitHub Actions: - Node.js 20 reached its end-of-life (EOL) in April 2026 [6]. - GitHub began the deprecation process for Node.js 20 on GitHub Actions runners following its EOL [6]. - While Node.js 24 has become the default runtime for GitHub Actions runners as of June 16, 2026, users were provided options to temporarily continue using Node.js 20 via environment variables (such as ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true) until the runtime is fully removed from runners in the fall of 2026 [6]. It is recommended to use the latest version of actions/labeler (currently v7.0.0 is available) or at least a version within the v6 series to ensure compatibility with modern Node.js runtimes [4][1].

Citations:


Upgrade actions/labeler off v5. It runs on Node 20, which is already EOL. Move to a supported major and pin it to a commit SHA.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-label.yml around lines 18 - 19, Update the “Label PR
based on files changed” workflow step to use a supported major version of
actions/labeler instead of v5, and pin the action reference to its specific
commit SHA rather than a mutable tag.

Comment on lines +18 to +23
- name: Label PR based on files changed
uses: actions/labeler@v5
with:
sync-labels: true
with:
sync-labels: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
sed -n '1,120p' .github/workflows/auto-label.yml | cat -n

Repository: groupthinking/MyXstack

Length of output: 740


Remove the duplicate with mapping. This step defines with twice, which breaks the workflow parser and stops actions/labeler@v5 from running. Keep only one with block.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 22-22: key "with" is duplicated in element of "steps" section. previously defined at line:20,col:9

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 22-22: duplication of key "with" in mapping

(key-duplicates)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-label.yml around lines 18 - 23, Remove the duplicate
with mapping in the “Label PR based on files changed” step using
actions/labeler@v5, keeping a single with block containing sync-labels: true so
the workflow parses and runs correctly.

Source: Linters/SAST tools

runs-on: ubuntu-latest
steps:
- name: Add triage label to new issues
uses: actions/github-script@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## issue-triage.yml\n'
cat -n .github/workflows/issue-triage.yml | sed -n '1,120p'

printf '\n## pinning policy search\n'
rg -n --hidden --glob '!.git' -e 'pinning|sha pin|commit sha|immutable action|actions/.*`@v`[0-9]+' .github .github/workflows README* docs* . || true

Repository: groupthinking/MyXstack

Length of output: 1991


Pin actions/github-script to a commit SHA.
actions/github-script@v7 is mutable; it can change under the same version tag while this workflow still has issues: write. Lock it to the exact commit SHA.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/issue-triage.yml at line 15, Update the
actions/github-script step to reference its exact commit SHA instead of the
mutable `@v7` tag, while preserving the existing workflow behavior and
permissions.

Source: Linters/SAST tools

owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: ['needs-triage']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## files mentioning needs-triage\n'
rg -n --hidden --glob '!**/.git/**' 'needs-triage' .

printf '\n## issue-triage workflow\n'
sed -n '1,220p' .github/workflows/issue-triage.yml

printf '\n## label-related config files\n'
fd -a -t f '.github' .

Repository: groupthinking/MyXstack

Length of output: 829


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## workflow outline/config references\n'
rg -n --hidden --glob '!**/.git/**' 'createLabel|labels:|issues\.labels|labeler|needs-triage' .github . || true

printf '\n## repository label definitions/configuration files\n'
fd -a -t f .github .

Repository: groupthinking/MyXstack

Length of output: 1022


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## issue-triage workflow\n'
cat -n .github/workflows/issue-triage.yml

printf '\n## labeler config\n'
if [ -f .github/labeler.yml ]; then
  cat -n .github/labeler.yml
fi

printf '\n## label files at repo root or .github\n'
find . -maxdepth 2 \( -name '*.yml' -o -name '*.yaml' \) | sort

Repository: groupthinking/MyXstack

Length of output: 1622


🌐 Web query:

GitHub REST API add labels to issue missing label behavior 404 422 repository labels

💡 Result:

When using the GitHub REST API to add labels to an issue via the POST /repos/{owner}/{repo}/issues/{issue_number}/labels endpoint, the behavior regarding non-existent labels and error status codes is as follows: HTTP 404 (Not Found): This status is typically returned if the repository, issue, or the specified endpoint path does not exist [1][2][3]. HTTP 422 (Validation Failed): If you attempt to add a label that does not already exist in the repository, this endpoint will typically return a 422 error [1][2][4]. The API expects the labels provided in the request body to already be defined within the repository's label set [1][3]. If a label is missing, the request fails validation because it cannot associate a non-existent label with the issue [1][2]. Regarding "missing label" behavior: - Adding labels: You must ensure the labels exist in the repository before attempting to add them to an issue [1][3]. If they do not exist, you must create them first using the POST /repos/{owner}/{repo}/labels endpoint [3]. - Removing labels: If you attempt to use the DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name} endpoint to remove a label that is not currently applied to the issue, it will return a 404 Not Found status [5][3]. Note: Documentation for these endpoints can sometimes contain inaccuracies regarding input validation [6], but the requirement that labels must exist before being added to an issue is standard behavior [1][3]. Always verify that your labels are created in the repository prior to assigning them to an issue [3].

Citations:


🌐 Web query:

"GitHub issues.addLabels missing labels ignored" "GitHub REST API"

💡 Result:

When using the GitHub REST API to add labels to an issue, the API requires that the labels already exist in the repository [1][2]. If you attempt to add a label that has not been previously created in the repository, the GitHub API will typically ignore that specific label or return an error, rather than automatically creating it for you [3]. Key points regarding this behavior: 1. Requirement of Pre-existence: The POST /repos/{owner}/{repo}/issues/{issue_number}/labels endpoint is designed to associate existing repository labels with an issue [1][4]. It does not have the functionality to create new labels on the fly [1][2]. 2. Silent Drops or Failures: In many contexts, such as when creating a new issue with a list of labels, GitHub will silently drop labels that do not exist or for which the user lacks sufficient permissions [5][3]. If you are using libraries like Octokit, note that the library does not automatically create missing labels; you must ensure the labels exist in the repository before referencing them in your API calls [3]. 3. Recommended Workflow: To add a label that may not exist, you should first check for its existence or attempt to create it using the POST /repos/{owner}/{repo}/labels endpoint. Only after verifying or creating the label should you proceed to add it to the issue [6][4]. If you find that labels are being ignored, ensure that the label name is spelled exactly as it appears in the repository (GitHub labels are case-sensitive) and that your API token or GitHub App has the necessary permissions to manage labels [5][3].

Citations:


Create needs-triage before using it here.
actions/github-script only adds existing repo labels. needs-triage isn’t defined anywhere in this repo, so every new issue will trip a failing addLabels call until the label exists. Add it in repo settings or bootstrap it in the workflow first.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/issue-triage.yml at line 22, Create the needs-triage
repository label before the actions/github-script step that uses labels:
['needs-triage'], either by adding it to repository settings or by bootstrapping
it in the workflow. Ensure the existing issue-triage labeling flow only calls
addLabels after confirming the label exists.

Source: MCP tools

Comment on lines +3 to +7
on:
pull_request:
branches: [main]
push:
branches: [main]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔵 Trivial

Cancel stale PR builds.

Every synchronization event can leave older npm ci and TypeScript builds running after a newer commit arrives. Add a concurrency group keyed by PR number or ref so stale work is cancelled instead of consuming runners and producing obsolete checks.

As per static analysis, zizmor reports missing concurrency limits. GitHub documents concurrency with cancel-in-progress for this case. (docs.github.com)

Proposed fix
 on:
   pull_request:
     branches: [main]
   push:
     branches: [main]

+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
pull_request:
branches: [main]
push:
branches: [main]
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-checks.yml around lines 3 - 7, Add a workflow-level
concurrency configuration to the PR checks workflow, using a group keyed by the
pull request number or ref and enabling cancel-in-progress. Keep the existing
pull_request and push triggers unchanged so newer runs cancel only their
corresponding stale builds.

Source: Linters/SAST tools

Comment on lines +17 to +18
- name: Checkout repository
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files .github/workflows/pr-checks.yml
echo '---'
cat -n .github/workflows/pr-checks.yml

Repository: groupthinking/MyXstack

Length of output: 884


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/pr-checks.yml')
print(p.exists())
if p.exists():
    print(p.read_text())
PY

Repository: groupthinking/MyXstack

Length of output: 644


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' .github/workflows/pr-checks.yml | cat -n

Repository: groupthinking/MyXstack

Length of output: 848


Disable persisted checkout creds. .github/workflows/pr-checks.yml:17-18 runs PR-controlled npm ci and npm run build right after checkout, and actions/checkout leaves the token in git config by default. Set persist-credentials: false; nothing here needs authenticated git access.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 17-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-checks.yml around lines 17 - 18, Update the
actions/checkout@v4 step in the workflow to set persist-credentials to false,
ensuring the PR-controlled npm ci and npm run build steps cannot access
persisted checkout credentials.

Source: MCP tools

Comment on lines +17 to +21
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## .github/workflows/pr-checks.yml\n'
cat -n .github/workflows/pr-checks.yml

printf '\n## .github/workflows/auto-label.yml\n'
cat -n .github/workflows/auto-label.yml

printf '\n## action refs across workflows\n'
rg -n 'uses:\s*[^@]+@' .github/workflows -g '*.yml' -g '*.yaml'

Repository: groupthinking/MyXstack

Length of output: 1890


Pin the workflow actions to commit SHAs. actions/checkout, actions/setup-node, actions/labeler, and actions/github-script are all on mutable tags here, so the code you run can drift without any repo diff. Lock them to full commit SHAs in .github/workflows/pr-checks.yml, .github/workflows/auto-label.yml, and .github/workflows/issue-triage.yml.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 17-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 21-21: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 2 files
  • .github/workflows/pr-checks.yml#L17-L21 (this comment)
  • .github/workflows/auto-label.yml#L15-L19
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-checks.yml around lines 17 - 21, Pin every referenced
third-party action to its full commit SHA instead of mutable tags: update
actions/checkout and actions/setup-node in .github/workflows/pr-checks.yml
(17-21), actions/labeler in .github/workflows/auto-label.yml (15-19), and
actions/github-script in .github/workflows/issue-triage.yml; retain each
action’s existing version as an inline comment for traceability.

@groupthinking

Copy link
Copy Markdown
Owner Author

Do not resolve the conflicts on this PR. Re-cut the branch from current main instead.

I audited all five open PRs (#106#110) against the GitHub compare API. Every one of them is a long-stale branch, not a genuine content conflict:

PR Head branch Ahead Behind Merge base
#106 claude/myxstack-agent-merge-myaock 12 33 2026-04-20
#107 copilot/add-workflow-files 5 103 2026-01-28
#108 copilot/clear-pending-prs 4 107 2026-01-28
#109 copilot/clear-pending-prs-again 4 117 2026-01-27
#110 fix-spam 1 53 2026-02-12

All five report status=diverged.

Why the diffs look absurd

#109 is titled "fix: replace invalid CODEOWNERS entries with @groupthinking" but reports +30,880 / −216 across 38 files, with essentially every file showing +N / −0 — including openapi.json (+23,095), package-lock.json (+1,187), and MOLT_STRATEGIC_ANALYSIS.md (+1,075).

That is not what the PR intends to change. The branch was cut on 2026-01-27 and opened as a PR on 2026-07-24 — a six-month gap during which main advanced 117 commits. The diff is being computed against that January merge base, so it renders the branch's stale snapshot of the tree as bulk additions.

The conflicts are therefore real, but they are drift, not disagreement. Resolving them by hand means manually reconciling six months of divergence across 38 files to land what should be a handful of line edits — and every manual resolution is an opportunity to silently revert work that landed on main in the interim.

Resolution

For each PR, the actual intent is small and is captured in only 1–12 commits. Re-apply that intent on top of current main:

git fetch origin
git checkout -b <name>-rebased origin/main
git cherry-pick <the 1-12 real commits>   # or simply re-make the edit by hand

Then open a replacement PR and close the stale one. For #109 specifically, the intended change is a CODEOWNERS edit — that is a few lines, and re-making it by hand against current main is strictly faster and safer than reconciling a 30k-line diff.

Recommended disposition:

Root cause to fix going forward: these five PRs were all opened within a 112-second window (22:41:30 → 22:43:22 on 2026-07-24) from branches that were months old. Whatever automation opened them did not rebase first. Adding a staleness check — refuse to open a PR whose branch is more than N commits behind its base — would prevent this class of PR entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants