Skip to content

Commit 57ad5c2

Browse files
renames
1 parent 521cb62 commit 57ad5c2

10 files changed

+22
-19
lines changed

.github/utilities/ai_spam.py renamed to .github/utilities/ai_pull_request.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
pr = repo.get_pull(pr_number)
1919
label_name = context_dict["event"]["label"]["name"]
2020

21-
if label_name == "AI Spam":
22-
comment_body = (
23-
"This pull request has been flagged with the **AI Spam** label.\n\n"
24-
"This PR is being closed."
21+
if label_name == "AI pull request":
22+
pr.create_issue_comment(
23+
"This pull request has been flagged with the **AI pull request** label as it"
24+
"is suspected to be comprised of mostly AI code.\n\n"
25+
"`aeon` does not accept pull requests that are primarily generated by AI "
26+
"tools.\n\n"
27+
"If you believe this label has been applied in error, contact us on Slack or"
28+
"GitHub."
2529
)
26-
pr.create_issue_comment(comment_body)
2730
pr.edit(state="closed")

.github/workflows/issue_assigned.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Issue Assigned
1+
name: Issue assigned
22

33
on:
44
issues:

.github/workflows/issue_comment_edited.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Issue Comment Edited
1+
name: Issue comment edited
22

33
on:
44
issue_comment:

.github/workflows/issue_comment_posted.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Issue Comment Posted
1+
name: Issue comment posted
22

33
on:
44
issue_comment:

.github/workflows/periodic_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Periodic Tests
1+
name: Periodic tests
22

33
on:
44
schedule:

.github/workflows/ai_spam.yml renamed to .github/workflows/pr_labelled.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: AI Spam Detection On PR
1+
name: Pull request labelled
22

33
on:
44
pull_request:
@@ -9,8 +9,8 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
ai-spam-present:
13-
if: ${{ github.event.label.name == 'AI Spam' }}
12+
ai-pull-request:
13+
if: ${{ github.event.label.name == 'AI pull request' }}
1414
runs-on: ubuntu-24.04
1515

1616
steps:
@@ -26,15 +26,15 @@ jobs:
2626
with:
2727
sparse-checkout: .github/utilities
2828

29-
- name: Setup Python 3.11
29+
- name: Setup Python 3.12
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: "3.11"
32+
python-version: "3.12"
3333

3434
- name: Install PyGithub
3535
run: pip install -Uq PyGithub
3636

37-
- name: Process AI Spam
37+
- name: Process AI label
3838
id: handle_spam
3939
run: python .github/utilities/ai_spam.py
4040
env:

.github/workflows/pr_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Opened
1+
name: PR opened
22

33
on:
44
pull_request_target:

.github/workflows/pr_typecheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PR Typecheck
1+
name: PR typecheck
22

33
on:
44
push:

.github/workflows/update_contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update Contributors
1+
name: Update contributors
22

33
on:
44
push:

.github/workflows/weekly_github_maintenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Weekly GitHub Maintenance
1+
name: Weekly GitHub maintenance
22

33
on:
44
schedule:

0 commit comments

Comments
 (0)