blob: ec59be3e7f67c57391011450cbddf854367c5340 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
name: Feature freeze check
on:
pull_request_target:
types:
- opened
branches:
- master
paths:
- 'clippy_lints/src/declared_lints.rs'
jobs:
auto-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
# Do not in any case add code that runs anything coming from the the content
# of the pull request, as malicious code would be able to access the private
# GitHub token.
steps:
- name: Add freeze warning comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
COMMENT=$(echo "**Seems that you are trying to add a new lint!**\n\
\n\
We are currently in a [feature freeze](https://doc.rust-lang.org/nightly/clippy/development/feature_freeze.html), so we are delaying all lint-adding PRs to September 18 and [focusing on bugfixes](https://github.com/rust-lang/rust-clippy/issues/15086).\n\
\n\
Thanks a lot for your contribution, and sorry for the inconvenience.\n\
\n\
With ❤ from the Clippy team.\n\
\n\
@rustbot note Feature-freeze\n\
@rustbot blocked\n\
@rustbot label +A-lint"
)
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/vnd.github.raw+json" \
-X POST \
--data "{\"body\":\"${COMMENT}\"}" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments"
|