Skip to content

Postagem comemoração 1200 seguidores, #189

Postagem comemoração 1200 seguidores,

Postagem comemoração 1200 seguidores, #189

name: Notify Telegram on Issue Opened
on:
issues:
types: [opened, closed, reopened, assigned, milestoned, labeled]
jobs:
notify-telegram:
runs-on: ubuntu-latest
permissions:
issues: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install httpx
run: |
python -m pip install --upgrade pip
pip install httpx
- name: Call telegram script.py
env:
TELEGRAM_BOT_TOKEN: "${{ secrets.TELEGRAM_BOT_TOKEN }}"
TELEGRAM_CHAT_ID: "${{ secrets.TELEGRAM_CHAT_ID }}"
ISSUE_TITLE: "${{ github.event.issue.title }}"
ISSUE_ID: "${{ github.event.issue.id }}"
ISSUE_NUMBER: "${{ github.event.issue.number }}"
ISSUE_URL: "${{ github.event.issue.html_url }}"
ISSUE_USER: "${{ github.event.issue.user.login }}"
# If you want raw JSON (safer for newlines/quotes), use toJSON:
ISSUE_BODY_JSON: '${{ toJSON(github.event.issue.body) }}'
REPO: "${{ github.repository }}"
# Turn label names array into a comma-separated string
ISSUE_LABELS: "${{ join(github.event.issue.labels.*.name, ', ') }}"
# If you’d prefer raw JSON array instead:
# ISSUE_LABELS_JSON: '${{ toJSON(github.event.issue.labels) }}'
run: |
python automations/telegram/issue.py