Skip to content
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

chore: do not lock issues after closed #31889

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/workflows/lock-issue-pr-with-message.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lock Closed Issues and PRs with message
name: Close issue message and lock closed PRs with message

on:
pull_request_target:
Expand All @@ -17,8 +17,8 @@ jobs:
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.
We appreciate you taking the time to provide feedback. However, It's hard for our team to track important updates in these closed discussions.
If you have an ongoing question or need further assistance, please open a new issue and reference the original one. That will ensure we receive a notification and can better track and address your concerns.
lock:
permissions:
pull-requests: write
Expand All @@ -27,14 +27,10 @@ jobs:
needs: auto_comment # only run after comment is complete
steps:
- name: Lock closed issue or PR
if: github.event_name == 'pull_request'
run: |
if [ "${{ github.event_name }}" == "issues" ]; then
ISSUE_NUMBER=${{ github.event.issue.number }}
ISSUE_URL=https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/lock
else
ISSUE_NUMBER=${{ github.event.pull_request.number }}
ISSUE_URL=https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/lock
fi
ISSUE_NUMBER=${{ github.event.pull_request.number }}
ISSUE_URL=https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/lock

curl -s -X PUT -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
Expand Down