Skip to content

Commit

Permalink
chore: Remove unnecessary actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Dec 22, 2023
1 parent d5117e5 commit 7e8d7f8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 270 deletions.
19 changes: 0 additions & 19 deletions .github/actions/qq_notify/qq_notify.py

This file was deleted.

163 changes: 0 additions & 163 deletions .github/workflows/Notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,166 +101,3 @@ jobs:
${{ github.event.pull_request.body }}
button_name: 👀前往查看👀
button_url: ${{ github.event.pull_request.html_url }}
qq-notify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install qq-botpy
- name: Get Body
if: endsWith(github.event_name,'comment')
run: |
input_string="${{ github.event.comment.body }}"
url_pattern="https?://[^\s]*|[^\s]*\.[^\s]*"
modified_input_string="$input_string"
for url in $(echo "$input_string" | grep -oE "$url_pattern"); do
url_without_https=${url#https:} # Remove https:
url_without_http=${url_without_https#http:} # Remove http:
url_with_dots_replaced=${url_without_https//./_} # Replace . with _
modified_input_string=${modified_input_string//$url/$url_with_dots_replaced}
done
echo "BODY<<EOF" >> $GITHUB_ENV
echo $modified_input_string >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Get Body
if: github.event_name == 'issues'
run: |
input_string="${{ github.event.issue.body }}"
url_pattern="https?://[^\s]*|[^\s]*\.[^\s]*"
modified_input_string="$input_string"
for url in $(echo "$input_string" | grep -oE "$url_pattern"); do
url_without_https=${url#https:} # Remove https:
url_without_http=${url_without_https#http:} # Remove http:
url_with_dots_replaced=${url_without_https//./_} # Replace . with _
modified_input_string=${modified_input_string//$url/$url_with_dots_replaced}
done
echo "BODY<<EOF" >> $GITHUB_ENV
echo $modified_input_string >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Get Body
if: github.event_name == 'discussion'
run: |
input_string="${{ github.event.discussion.body }}"
url_pattern="https?://[^\s]*|[^\s]*\.[^\s]*"
modified_input_string="$input_string"
for url in $(echo "$input_string" | grep -oE "$url_pattern"); do
url_without_https=${url#https:} # Remove https:
url_without_http=${url_without_https#http:} # Remove http:
url_with_dots_replaced=${url_without_https//./_} # Replace . with _
modified_input_string=${modified_input_string//$url/$url_with_dots_replaced}
done
echo "BODY<<EOF" >> $GITHUB_ENV
echo $modified_input_string >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Get Body
if: github.event_name == 'pull_request_target'
run: |
input_string="${{ github.event.pull_request.body }}"
url_pattern="https?://[^\s]*|[^\s]*\.[^\s]*"
modified_input_string="$input_string"
for url in $(echo "$input_string" | grep -oE "$url_pattern"); do
url_without_https=${url#https:} # Remove https:
url_without_http=${url_without_https#http:} # Remove http:
url_with_dots_replaced=${url_without_https//./_} # Replace . with _
modified_input_string=${modified_input_string//$url/$url_with_dots_replaced}
done
echo "BODY<<EOF" >> $GITHUB_ENV
echo $modified_input_string >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# issue_comment
- name: send issue_comment message
if: github.event_name == 'issue_comment'
run: python3 .github/actions/qq_notify/qq_notify.py
env:
APPID: ${{ secrets.QQ_BOT_APPID }}
TOKEN: ${{ secrets.QQ_BOT_TOKEN }}
CHANNELID: ${{ secrets.QQ_CHANNELID }}
MESSAGE: |
📣 New ${{github.event_name}} in pot-desktop
💡Title: ${{ github.event.issue.title }}
👤User: ${{ github.event.sender.login }}
${{ env.BODY }}
# discussion_comment
- name: send discussion_comment message
if: github.event_name == 'discussion_comment'
run: python3 .github/actions/qq_notify/qq_notify.py
env:
APPID: ${{ secrets.QQ_BOT_APPID }}
TOKEN: ${{ secrets.QQ_BOT_TOKEN }}
CHANNELID: ${{ secrets.QQ_CHANNELID }}
MESSAGE: |
📣 New ${{github.event_name}} in pot-desktop
💡Title: ${{ github.event.discussion.title }}
👤User: ${{ github.event.sender.login }}
${{ env.BODY }}
# issues
- name: send issue message
if: github.event_name == 'issues'
run: python3 .github/actions/qq_notify/qq_notify.py
env:
APPID: ${{ secrets.QQ_BOT_APPID }}
TOKEN: ${{ secrets.QQ_BOT_TOKEN }}
CHANNELID: ${{ secrets.QQ_CHANNELID }}
MESSAGE: |
📣 New ${{github.event_name}} in pot-desktop
💡Title: ${{ github.event.issue.title }}
👤User: ${{ github.event.sender.login }}
${{ env.BODY }}
# discussion
- name: send discussion message
if: github.event_name == 'discussion'
run: python3 .github/actions/qq_notify/qq_notify.py
env:
APPID: ${{ secrets.QQ_BOT_APPID }}
TOKEN: ${{ secrets.QQ_BOT_TOKEN }}
CHANNELID: ${{ secrets.QQ_CHANNELID }}
MESSAGE: |
📣 New ${{github.event_name}} in pot-desktop
💡Title: ${{ github.event.discussion.title }}
👤User: ${{ github.event.sender.login }}
${{ env.BODY }}
# pull_request
- name: send pull_request_target message
if: github.event_name == 'pull_request_target'
run: python3 .github/actions/qq_notify/qq_notify.py
env:
APPID: ${{ secrets.QQ_BOT_APPID }}
TOKEN: ${{ secrets.QQ_BOT_TOKEN }}
CHANNELID: ${{ secrets.QQ_CHANNELID }}
MESSAGE: |
📣 New ${{github.event_name}} in pot-desktop
💡Title: ${{ github.event.pull_request.title }}
👤User: ${{ github.event.sender.login }}
${{ env.BODY }}
26 changes: 0 additions & 26 deletions .github/workflows/Review.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .gitlab/ci.yml

This file was deleted.

File renamed without changes.

0 comments on commit 7e8d7f8

Please sign in to comment.