Skip to content

Commit 7edd6d6

Browse files
authored
Merge branch 'master' into gradle
2 parents f204d30 + 7e1ac86 commit 7edd6d6

File tree

4 files changed

+56
-7
lines changed

4 files changed

+56
-7
lines changed

.github/config/comvent-ad.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
version: 0.2.0
3+
4+
trigger: default
5+
6+
keywords:
7+
- name: blocked-words
8+
value: [leetcode-assistant|LeetCode Assistant]

.github/workflows/monitor-abusive.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Monitor Abusive Comments
2+
on:
3+
issue_comment:
4+
# This shouldn't be called for comment deletion
5+
types:
6+
- created
7+
- edited
8+
9+
jobs:
10+
abuse-monitor:
11+
name: With latest code base
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Handle with Comvent
16+
uses: rytswd/[email protected]
17+
id: comvent
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
config-path: .github/config/comvent-ad.yaml
21+
22+
# The below only runs when comvent finds matching comment.
23+
# This assumes that comvent config holding 'some-abusive-content' as a keyword.
24+
- if: steps.comvent.outputs.blocked-words != ''
25+
name: Handle some abusive content
26+
uses: actions/github-script@v3
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
# An example of removing the abusive comment, and leaving a comment about the deletion.
30+
script: |
31+
github.issues.deleteComment({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
comment_id: ${{ github.event.comment.id }}
35+
})
36+
const comment = `Found blocked words! 😰
37+
The comment was thus removed.`;
38+
github.issues.createComment({
39+
issue_number: context.issue.number,
40+
owner: context.repo.owner,
41+
repo: context.repo.repo,
42+
body: comment
43+
})

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
if: ${{ github.event_name == 'workflow_dispatch'}}
2626
run: echo "LD_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
2727

28-
- name: Set up JDK 1.8
28+
- name: Set up JDK 11
2929
uses: actions/setup-java@v1
3030
with:
31-
java-version: 1.8
31+
java-version: 11
3232

3333
- name: Grant execute permission for gradlew
3434
run: chmod +x gradlew
@@ -45,9 +45,7 @@ jobs:
4545
failure-levels: |
4646
INVALID_PLUGIN
4747
ide-versions: |
48-
ideaIC:2019.3
49-
ideaIC:2020.1
50-
ideaIC:2020.2
48+
ideaIC:2021.1
5149
ideaIC:LATEST-EAP-SNAPSHOT
5250
5351
- name: Print verify contents

.github/workflows/snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Set LD_VERSION
1717
run: echo "LD_VERSION=0.0" >> $GITHUB_ENV
1818

19-
- name: Set up JDK 1.8
19+
- name: Set up JDK 11
2020
uses: actions/setup-java@v1
2121
with:
22-
java-version: 1.8
22+
java-version: 11
2323

2424
- name: Grant execute permission for gradlew
2525
run: chmod +x gradlew

0 commit comments

Comments
 (0)