Skip to content

Update link-pr-to-issue.yml#330

Merged
Ivanmeneges merged 2 commits into
developfrom
Ivanmeneges-patch-6
May 25, 2026
Merged

Update link-pr-to-issue.yml#330
Ivanmeneges merged 2 commits into
developfrom
Ivanmeneges-patch-6

Conversation

@Ivanmeneges

@Ivanmeneges Ivanmeneges commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • Chores
    • Refined PR-to-issue linking workflow with improved comment handling and message formatting for consistency
    • Enhanced the cleanup process for stale issue links with more robust detection and reliable removal of outdated references
    • Extended linked PR comment details to include additional metadata such as status information and UTC timestamps for improved transparency and tracking

Review Change Stack

Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com>
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Ivanmeneges, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 37 minutes and 19 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04f482b9-d741-4679-8ffd-6e8cbde2ebb1

📥 Commits

Reviewing files that changed from the base of the PR and between ca166c6 and 4303d45.

📒 Files selected for processing (1)
  • .github/workflows/link-pr-to-issue.yml

Walkthrough

The PR refines the GitHub Actions workflow that links pull requests to issues. The cleanup section now uses pagination to locate stale marker comments for deletion. The process section removes PR_TITLE from the environment, computes a STATUS value from PR state, expands the marker comment body with additional metadata and timestamps, adjusts the update/create branching logic, and removes debug output while preserving the non-failing exit behavior.

Changes

PR-to-issue linker workflow refinements

Layer / File(s) Summary
Input validation and marker definition
.github/workflows/link-pr-to-issue.yml
PR title and body extraction lines are re-anchored for downstream steps; marker constant is defined to identify linker-managed comments.
Cleanup stale issue links pagination
.github/workflows/link-pr-to-issue.yml
Pagination loop iterates through issue comments to locate the first comment containing the marker when an issue no longer appears in the PR body, preparing it for deletion.
Process issue links environment and status
.github/workflows/link-pr-to-issue.yml
Step environment is simplified to include only GH_TOKEN and PR_URL (removing PR_TITLE); STATUS string is computed from PR action and merge state for inclusion in the marker comment.
Comment body construction and update/create logic
.github/workflows/link-pr-to-issue.yml
Marker comment body is expanded to include PR, source, status, and "Updated" UTC timestamp fields with consistent marker placement; update and create branches are adjusted around the "comment found" vs "not found" control flow.
Output and error handling simplification
.github/workflows/link-pr-to-issue.yml
Debug output from create response bodies is removed; explicit inline "DO NOT fail workflow" comment is removed while preserving the terminal exit 0 behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • mosip/kattu#323: Introduced the original PR-to-issue linker workflow; this PR refines the marker comment lifecycle and status computation logic introduced there.

Suggested reviewers

  • ckm007

Poem

🐰 A rabbit's hop through workflows fine,
Comments cleaned and states align,
Timestamps mark the present hour,
PR links now have greater power,
Stale markers fade, new status shines! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update link-pr-to-issue.yml' is vague and generic, merely stating a file name without conveying what changed or why. Provide a more descriptive title that explains the actual change, such as 'Refactor PR-to-issue linking logic with improved comment handling' or 'Add status-based linking and timestamp updates to issue comments'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 Ivanmeneges-patch-6

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.

@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: 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/link-pr-to-issue.yml:
- Around line 238-245: The BODY_TEXT variable contains list lines prefixed with
~12 spaces which will render as a code block in GitHub Markdown; update the
BODY_TEXT string (the lines with "- PR: ${PR_URL}", "- Source: ${SOURCE_REPO}",
"- Status: ${STATUS}", "- Updated: $(date ...)", and "${MARKER}") to remove
leading indentation so each bullet starts at column 0 (or use no leading spaces)
to ensure the list renders as Markdown bullets rather than a fenced code block.
🪄 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: 66a9458c-17f2-4bfc-a4a8-74ca6c12c8ca

📥 Commits

Reviewing files that changed from the base of the PR and between 47ba97a and ca166c6.

📒 Files selected for processing (1)
  • .github/workflows/link-pr-to-issue.yml

Comment thread .github/workflows/link-pr-to-issue.yml Outdated
Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com>
@Ivanmeneges Ivanmeneges merged commit 6b57629 into develop May 25, 2026
5 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