Skip to content

feat: add check-pr-issue-link reusable workflow#9

Merged
glageju merged 1 commit into
mainfrom
gautam-feat/needs-issue-link-workflow
Jul 8, 2026
Merged

feat: add check-pr-issue-link reusable workflow#9
glageju merged 1 commit into
mainfrom
gautam-feat/needs-issue-link-workflow

Conversation

@glageju

@glageju glageju commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Partially closes https://github.com/stacklok/claude-plugins/issues/275

Summary

  • Adds check-pr-issue-link.yml, copied from StacklokLabs/workflow-templates, as a reusable workflow (workflow_call) callable by repos in the StacklokLabs organization.
  • On PR open/edit/reopen/sync, checks the PR body for a closing keyword (closes/fixes/resolves/etc.) referencing a valid issue number. Posts/updates a comment and applies a needs-issue-link label when the link is missing or invalid; clears both once a valid link is present.
  • Pins actions/github-script to the same SHA (v7.1.0) already used by needs-triage.yml in this repo, consistent with existing convention.

Test plan

  • Confirm the workflow YAML is valid (lint/parse check in CI)
  • Enable "Accessible from repositories in the 'StacklokLabs' organization" under Settings → Actions → General → Access for this repo
  • Call the workflow from a downstream repo with workflow_call and verify label/comment behavior on a PR with no issue link, an invalid issue link, and a valid issue link

Out of scope

  • Checking the Issue link from cross org/ cross repo reference

Copies the check-pr-issue-link workflow from StacklokLabs/workflow-templates
so repos in this org can call it to enforce that PRs reference a valid issue.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Missing Issue Link

This PR does not appear to reference a GitHub issue.
Please add a closing keyword, e.g.: Closes #123
Supported: closes, fixes, resolves, close, fix, resolve (case insensitive)

@glageju glageju marked this pull request as ready for review July 8, 2026 16:23
@glageju glageju requested a review from a team as a code owner July 8, 2026 16:23
@glageju glageju merged commit da6b789 into main Jul 8, 2026
4 checks passed
@glageju glageju deleted the gautam-feat/needs-issue-link-workflow branch July 8, 2026 16:47
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