Skip to content

Add use-pr-linker workflow to auto-link PRs to issues#125

Open
Ivanmeneges wants to merge 1 commit into
developfrom
add/use-pr-linker-workflow-develop
Open

Add use-pr-linker workflow to auto-link PRs to issues#125
Ivanmeneges wants to merge 1 commit into
developfrom
add/use-pr-linker-workflow-develop

Conversation

@Ivanmeneges
Copy link
Copy Markdown

@Ivanmeneges Ivanmeneges commented May 25, 2026

Summary

Adds use-pr-linker.yml workflow that calls the reusable PR-to-issue linker from mosip/kattu (@develop).

Notes

  • Requires ACTION_PAT repository secret to be configured.
  • Target branch: develop.

Summary by CodeRabbit

  • Chores
    • Added automatic linking of pull requests to related issues during the pull request workflow

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Walkthrough

A new GitHub Actions workflow is added that automatically links pull requests to related issues. The workflow triggers on specified PR event types, configures permissions for repository and issue access, and invokes an external reusable workflow from the kattu repository, passing an authentication token via secrets.

Changes

GitHub Actions PR Linking Setup

Layer / File(s) Summary
Auto-link PR to Issues workflow
.github/workflows/use-pr-linker.yml
Workflow triggers on PR opened, edited, synchronize, closed, and reopened events, grants read and write permissions for repository contents and issues, and calls the external mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop reusable workflow, passing ACTION_PAT secret for authentication.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A workflow springs to life so bright,
PR to issues, linking right,
Secrets passed with gentle care,
Automation fills the air!
Kattu's reuse, a clever share!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a GitHub Actions workflow that auto-links pull requests to issues.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add/use-pr-linker-workflow-develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com>
@Ivanmeneges Ivanmeneges force-pushed the add/use-pr-linker-workflow-develop branch from a8624c6 to 308719e Compare May 26, 2026 04:55
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/workflows/use-pr-linker.yml:
- Line 14: The workflow currently references a mutable branch in the uses string
"mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop"; replace that
branch ref with the repository's immutable full commit SHA (e.g., change the
suffix from `@develop` to @<full-commit-sha>) so the reusable workflow is pinned
to a specific commit and cannot change unexpectedly.
🪄 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: CHILL

Plan: Pro

Run ID: e908fe52-ddf3-4f97-8843-1fe0fdfa6214

📥 Commits

Reviewing files that changed from the base of the PR and between 892d6da and 308719e.

📒 Files selected for processing (1)
  • .github/workflows/use-pr-linker.yml


jobs:
call-linker:
uses: mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin reusable workflow to an immutable commit SHA

.github/workflows/use-pr-linker.yml invokes the reusable workflow with @develop (mutable), which can change without this repo’s review. Pin mosip/kattu/.github/workflows/link-pr-to-issue.yml to a full commit SHA.

Suggested change
-    uses: mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop
+    uses: mosip/kattu/.github/workflows/link-pr-to-issue.yml@<full_commit_sha>
🧰 Tools
🪛 zizmor (1.25.2)

[error] 14-14: 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/use-pr-linker.yml at line 14, The workflow currently
references a mutable branch in the uses string
"mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop"; replace that
branch ref with the repository's immutable full commit SHA (e.g., change the
suffix from `@develop` to @<full-commit-sha>) so the reusable workflow is pinned
to a specific commit and cannot change unexpectedly.

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