File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed
.github/actions/artifact-size-metrics/download-and-process Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change 2020 chmod +x ../utils/download-and-process/main.sh
2121 ../utils/download-and-process/main.sh
2222
23- - name : Comment artifact size metrics comparison
24- if : github.event_name == 'pull_request'
25- uses : actions/github-script@v7
26- with :
27- script : |
28- const fs = require('node:fs')
29-
30- // Read the artifact size metrics comparison
31- const comparison = fs.readFileSync('build/reports/metrics/artifact-analysis.md', 'utf8')
32-
33- // Get PR ID
34- const { data : pullRequest } = await github.rest.pulls.get({
35- owner : context.repo.owner,
36- repo : context.repo.repo,
37- pull_number : context.issue.number
38- })
39- const pullRequestId = pullRequest.node_id
40-
41- // Add the comment
42- const addCommentResponse = await github.graphql(`
43- mutation {
44- addComment(input : {body: """${comparison}""", subjectId: "${pullRequestId}"}) {
45- commentEdge { node { id } }
46- }
47- }
48- ` )
49-
50- const commentId = addCommentResponse.addComment.commentEdge.node.id
51-
52- // Minimize the comment
53- await github.graphql(`
54- mutation {
55- minimizeComment(input : {subjectId: "${commentId}", classifier: RESOLVED}) { }
56- }
57- ` )
58-
5923 - name : Large size increase?
6024 if : ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }}
6125 shell : bash
You can’t perform that action at this time.
0 commit comments