Skip to content

Fix Action results and enforce PR gates - #1

Merged
EhsanAzish80 merged 3 commits into
mainfrom
fix/reliable-pr-gates
Dec 4, 2026
Merged

EhsanAzish80 merged 3 commits into
mainfrom
fix/reliable-pr-gates

Conversation

@EhsanAzish80

Copy link
Copy Markdown
Owner

Why

The Action reads the wrong JSON fields from devscope summary --json. It can report grade F after a successful scan, hide analysis errors, and only apply thresholds on pushes.

Changes

  • Read the actual summary fields and fail when analysis fails.
  • Apply configured thresholds on pull requests and pushes.
  • Pin the installed Devscope version and pass Action inputs safely.
  • Keep one PR comment, including on long threads; skip the comment when a fork token lacks write access.
  • Add local script checks and run them in the Action test workflow.

Tested

  • Shell checks passed for valid output, incomplete output, and threshold failure.
  • Parsed Action and workflow YAML.
  • Ran the analysis script against the Devscope 0.2.0 branch locally.

The default package version remains the published 0.1.1. After Devscope 0.2.0 is released, users can set devscope-version: '0.2.0'.

Read the summary JSON schema, fail on analysis errors, apply thresholds on pull requests, and keep comment failures from hiding results. Test output parsing and threshold propagation.
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Devscope Report

Grade: F
Risk: Medium
Onboarding: Moderate
Scan time: 0.002022266387939453s

Devscope: F · Medium risk · Moderate onboarding

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

Devscope Report

Grade: F
Risk: Medium
Onboarding: Moderate
Scan time: 0.0029439926147460938s

Devscope: F · Medium risk · Moderate onboarding

@EhsanAzish80
EhsanAzish80 marked this pull request as ready for review December 4, 2026 10:51
@EhsanAzish80
EhsanAzish80 merged commit ee71197 into main Dec 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant