GHA: Fix intermittent workflow error

Periodically, the discussion-lock workflow throws the error: `Resource
not accessible by integration`

This was identified in the
[upstream](https://github.com/dessant/lock-threads)
issue 47, as caused by a version-5 change that adds support for
management of discussions but requires additional permissions
and possibly settings.  Given the low notification traffic from
discussions, old discussions may remain valid for a long while, and are
a useful community-interface:  Disable management of discussions.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich
2024-04-08 11:07:46 -04:00
parent 4452d307ec
commit 7f0268a2e7

View File

@ -2,7 +2,7 @@
# Format ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: "Lock closed Issue/PR discussions"
name: "Lock closed issues and PRs"
on:
schedule:
@ -38,8 +38,7 @@ env:
LOCKED_LABEL: 'locked - please file new issue/PR'
jobs:
closed_issue_discussion_lock:
name: "Lock closed Issue/PR discussions"
manage_locking:
runs-on: ubuntu-latest
permissions:
issues: write
@ -48,6 +47,7 @@ jobs:
# Ref: https://github.com/dessant/lock-threads#usage
- uses: dessant/lock-threads@v5
with:
process-only: 'issues, prs'
issue-inactive-days: '${{env.CLOSED_DAYS}}'
pr-inactive-days: '${{env.CLOSED_DAYS}}'
add-issue-labels: '${{env.LOCKED_LABEL}}'