Skip to content

Commit 6b9f896

Browse files
authored
fix: Remove elevated permissions in GitHub CI performance benchmark (#9966)
1 parent e78e58d commit 6b9f896

File tree

1 file changed

+1
-57
lines changed

1 file changed

+1
-57
lines changed

.github/workflows/ci-performance.yml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ci-performance
22
on:
3-
pull_request_target:
3+
pull_request:
44
branches:
55
- alpha
66
- beta
@@ -17,8 +17,6 @@ env:
1717

1818
permissions:
1919
contents: read
20-
pull-requests: write
21-
issues: write
2220

2321
jobs:
2422
performance-check:
@@ -172,23 +170,6 @@ jobs:
172170
echo "baseline.json size: $(wc -c < baseline.json) bytes"
173171
echo "pr.json size: $(wc -c < pr.json) bytes"
174172
175-
- name: Store benchmark result (PR)
176-
uses: benchmark-action/github-action-benchmark@v1
177-
if: github.event_name == 'pull_request' && hashFiles('pr.json') != ''
178-
continue-on-error: true
179-
with:
180-
name: Parse Server Performance
181-
tool: 'customSmallerIsBetter'
182-
output-file-path: pr.json
183-
github-token: ${{ secrets.GITHUB_TOKEN }}
184-
auto-push: false
185-
save-data-file: false
186-
alert-threshold: '110%'
187-
comment-on-alert: true
188-
fail-on-alert: false
189-
alert-comment-cc-users: '@parse-community/maintainers'
190-
summary-always: true
191-
192173
- name: Compare benchmark results
193174
id: compare
194175
run: |
@@ -278,43 +259,6 @@ jobs:
278259
path: comparison.md
279260
retention-days: 30
280261

281-
- name: Prepare comment body
282-
if: github.event_name == 'pull_request'
283-
run: |
284-
echo "## Performance Impact Report" > comment.md
285-
echo "" >> comment.md
286-
if [ -f comparison.md ]; then
287-
cat comparison.md >> comment.md
288-
else
289-
echo "⚠️ Could not generate performance comparison." >> comment.md
290-
fi
291-
echo "" >> comment.md
292-
echo "<details>" >> comment.md
293-
echo "<summary>📊 View detailed results</summary>" >> comment.md
294-
echo "" >> comment.md
295-
echo "### Baseline Results" >> comment.md
296-
echo "\`\`\`json" >> comment.md
297-
cat baseline.json >> comment.md
298-
echo "\`\`\`" >> comment.md
299-
echo "" >> comment.md
300-
echo "### PR Results" >> comment.md
301-
echo "\`\`\`json" >> comment.md
302-
cat pr.json >> comment.md
303-
echo "\`\`\`" >> comment.md
304-
echo "" >> comment.md
305-
echo "</details>" >> comment.md
306-
echo "" >> comment.md
307-
echo "> **Note:** Thresholds: ⚠️ >25%, ❌ >50%." >> comment.md
308-
309-
- name: Comment PR with results
310-
if: github.event_name == 'pull_request'
311-
uses: thollander/actions-comment-pull-request@v2
312-
continue-on-error: true
313-
with:
314-
filePath: comment.md
315-
comment_tag: performance-benchmark
316-
mode: recreate
317-
318262
- name: Generate job summary
319263
if: always()
320264
run: |

0 commit comments

Comments
 (0)