-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add unlock functionality for reopened issues and PRs in locker workflow #119003
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
…rkflow Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
@copilot you don't need to have a separate step for pull requests since they're treated as issues by GitHub already. Use code like this to unlock the pr/issue:
|
@copilot oh and use the |
… logic Co-authored-by: akoeplinger <1376924+akoeplinger@users.noreply.github.com>
Updated the workflow to use |
/ba-g only change to a GitHub Action so no AzDO builds got triggered |
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.
Pull Request Overview
This PR enhances the GitHub Actions locker workflow to automatically unlock issues and pull requests when they are reopened, ensuring that previously locked conversations become accessible again when discussion resumes.
Key changes:
- Added event triggers for
issues.reopened
andpull_request_target.reopened
- Split workflow into separate lock and unlock jobs with appropriate conditions
- Implemented unlock functionality using GitHub REST API
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
/ba-g only change to a GitHub Action so no AzDO builds got triggered |
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
This PR enhances the
.github/workflows/locker.yml
workflow to automatically unlock issues and pull requests when they are reopened, addressing the need to make previously locked items accessible again when discussion resumes.Changes Made
New Event Triggers
issues.reopened
trigger to detect when closed issues are reopenedpull_request_target.reopened
trigger to detect when closed PRs are reopenedEnhanced Job Logic
Lock job (renamed from
main
for clarity):github.event_name != 'issues' && github.event_name != 'pull_request_target'
New unlock job:
github.event.action == 'reopened'
actions/github-script@v7
with GitHub REST API to unlock itemsgithub.event.issue.locked == true
Workflow Behavior
Technical Implementation
The unlock functionality uses the GitHub Issues API (which also handles PRs) through
actions/github-script@v7
:This ensures that when maintainers or contributors reopen issues or PRs for continued discussion, they won't encounter locked conversation threads that prevent community engagement.
Fixes the workflow gap where reopened items remained inaccessible for comments despite being active again.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.