Skip to content

Commit

Permalink
Add GitHub actions (#22)
Browse files Browse the repository at this point in the history
* Add tg-notify on closed PRs

* Add pep8speaks settings

* fixup! Add tg-notify on closed PRs
  • Loading branch information
gkirgizov authored Jan 20, 2023
1 parent a6700df commit e690fa8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: telegram notify
on:
pull_request:
types: [ closed ]

jobs:

merge_job:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: "The ${{github.event_name}} '${{github.event.pull_request.title}}' (#${{github.event.number}}) was merged.
\nLink: ${{github.event.pull_request.html_url}}
\nDescription: ${{github.event.pull_request.body}}
\n
\nCheck it out to keep your local repository updated."


close_job:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
args: The ${{github.event_name}} ${{github.event.pull_request.title}} (${{github.event.number}}) was closed.
9 changes: 9 additions & 0 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scanner:
diff_only: False # The entire file touched by the PR will be scanned for errors
linter: flake8

flake8:
max-line-length: 120 # Default is 79 in PEP 8
ignore: []

no_blank_comment: False # Every PR will have its own pep8speaks stats

0 comments on commit e690fa8

Please sign in to comment.