-
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: issue-PR linking plugin to comment on issues when PRs reference them #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@nzakas 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
|
Hi @Copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
Hi @Copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
…ence them Co-authored-by: nzakas <[email protected]>
Hi @Copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
2 similar comments
Hi @copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
Hi @Copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
Hi @Copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually looks like it should do what we want. Would like another review. @eslint/eslint-team
Hi @copilot!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
This PR implements a new plugin that automatically comments on issues when pull requests are created or edited to reference them. This addresses the long-standing request to help issue followers stay informed when discussion moves to a PR.
How it works
The plugin listens for
pull_request.opened
andpull_request.edited
events and uses regex pattern matching to find issue references in PR titles. When it finds patterns like:It automatically posts a friendly comment on the referenced issues:
Safeguards against abuse
To prevent the abuse scenario mentioned in the original issue (PRs with titles like "#1 #2 #3 #4 #5 #6 #7 ..."), several safeguards are implemented:
Implementation details
src/plugins/issue-pr-link/index.js
tests/plugins/issue-pr-link/index.js
The regex pattern
/(?:fix|fixes|close|closes|resolve|resolves)\s+#(\d+)/giu
ensures that random issue numbers (like "#999 in documentation") won't trigger comments without proper context keywords.Fixes #77.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.