Skip to content

Commit 1206c57

Browse files
committed
add minimize-comment-as-outdated step after running /test
1 parent 3761a55 commit 1206c57

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/run-team-city-tests-on-comment.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
});

0 commit comments

Comments
 (0)