File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,3 +141,30 @@ jobs:
141141 issue_number: context.issue.number,
142142 body: '⚠️ You are not authorized to run tests. Only members of the designated team can trigger test runs.'
143143 });
144+
145+ minimize-comment-as-outdated :
146+ runs-on : ubuntu-latest
147+ needs : [run-tests, unauthorized-comment]
148+ if : always()
149+ steps :
150+ - name : Minimize triggering comment as outdated
151+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
152+ with :
153+ github-token : ${{ secrets.GITHUB_TOKEN }}
154+ script : |
155+ const mutation = `
156+ mutation($subjectId: ID!) {
157+ minimizeComment(input: {subjectId: $subjectId, classifier: OUTDATED}) {
158+ minimizedComment {
159+ isMinimized
160+ minimizedReason
161+ }
162+ }
163+ }
164+ `;
165+
166+ const commentNodeId = context.payload.comment.node_id;
167+
168+ await github.graphql(mutation, {
169+ subjectId: commentNodeId
170+ });
You can’t perform that action at this time.
0 commit comments