Skip to content

PR-Issue link check#1

Merged
glageju merged 4 commits intomainfrom
feat/public-workflow-for-check-issue-link
Mar 6, 2026
Merged

PR-Issue link check#1
glageju merged 4 commits intomainfrom
feat/public-workflow-for-check-issue-link

Conversation

@glageju
Copy link
Copy Markdown
Collaborator

@glageju glageju commented Mar 6, 2026

Summary

Adds a reusable GitHub Actions workflow that validates PR descriptions contain a valid linked issue reference. This enforces the practice of tying every pull request to an issue for better traceability.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • CI/CD changes

Changes

  • Added workflows/check-pr-issue-link.yml — a new reusable workflow that:
    • Triggers on pull_request events (opened, edited, reopened, synchronize) and supports workflow_call for cross-repo use within the StacklokLabs organization
    • Parses the PR body for closing keywords (closes, fixes, resolves and variants) referencing issue numbers
    • Validates referenced numbers are real issues (not PRs or non-existent)
    • Posts/updates/removes a sentinel-tagged warning comment depending on the result
    • Manages a needs-issue-link label to flag PRs missing a valid link
    • Uses concurrency groups to cancel in-progress checks on the same PR

Testing

  • Manual testing

Closes #1
Fixes #2

@glageju glageju marked this pull request as ready for review March 6, 2026 00:22
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

Invalid Issue Reference

  • #2 does not exist in this repository
  • #1 is a pull request, not an issue

Please update the PR description to reference a valid issue.

@glageju glageju requested review from lorr1 and tgrunnagle March 6, 2026 01:00
Comment thread README.md Outdated

### Prerequisites

- The calling workflow must declare the required permissions:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you add a sentence as to why it requires write permissions if you know.

@glageju glageju merged commit 3e209fd into main Mar 6, 2026
1 check passed
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.

2 participants