Skip to content

Commit 823ee8a

Browse files
committed
Cleanup feature_freeze
1 parent 60a978d commit 823ee8a

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

.github/workflows/feature_freeze.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,26 @@ jobs:
2020
# of the pull request, as malicious code would be able to access the private
2121
# GitHub token.
2222
steps:
23-
- name: Check PR Changes
24-
id: pr-changes
25-
run: echo "::set-output name=changes::${{ toJson(github.event.pull_request.changed_files) }}"
26-
27-
- name: Create Comment
28-
if: steps.pr-changes.outputs.changes != '[]'
29-
run: |
30-
# Use GitHub API to create a comment on the PR
31-
PR_NUMBER=${{ github.event.pull_request.number }}
32-
COMMENT="**Seems that you are trying to add a new lint!**\nWe 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.\nThanks a lot for your contribution, and sorry for the inconvenience.\nWith ❤ from the Clippy team\n\n@rustbot note Feature-freeze\n@rustbot blocked\n@rustbot label +A-lint\n"
33-
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
34-
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
35-
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"
23+
- name: Add freeze warning comment
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GITHUB_REPOSITORY: ${{ github.repository }}
27+
PR_NUMBER: ${{ github.event.pull_request.number }}
28+
run: |
29+
COMMENT=$(echo "**Seems that you are trying to add a new lint!**\n\
30+
\n\
31+
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\
32+
\n\
33+
Thanks a lot for your contribution, and sorry for the inconvenience.\n\
34+
\n\
35+
With ❤ from the Clippy team.\n\
36+
\n\
37+
@rustbot note Feature-freeze\n\
38+
@rustbot blocked\n\
39+
@rustbot label +A-lint"
40+
)
41+
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
42+
-H "Content-Type: application/vnd.github.raw+json" \
43+
-X POST \
44+
--data "{\"body\":\"${COMMENT}\"}" \
45+
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments"

0 commit comments

Comments
 (0)