Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pythonでslackの困りごとを何とかしてみた①

Yuuki Shimizu
September 09, 2020

 Pythonでslackの困りごとを何とかしてみた①

Yuuki Shimizu

September 09, 2020
Tweet

More Decks by Yuuki Shimizu

Other Decks in Programming

Transcript

  1. ۀ຿Ͱͷ࠷ۙͷࠔΓ͝ͱ 4 ձࣾ Slack ͷνϟϯωϧ͕૿͑͗ͯ͢୳͢ͷ͕େมʂ શࣾ࿈བྷ ܽ੮࿈བྷ ߪೖਃ੥ ࡶஊ ։ൃؔ࿈৘ใڞ༗

    ֤छϩάग़ྗ ֤Ҋ݅ͷνʔϜ࿈བྷ χϡʔεڞ༗ πʔϧ༡ͼ৔ ֤ϝϯόʔͷ෼ใ ΠϕϯτࢀՃใࠂ FUD ׆ಈͷແ͍νϟϯωϧ͸Ϧετ͔ΒӅ͍ͨ͠
  2. ᶅ GitHub Actions ϫʔΫϑϩʔ࡞੒ • ຖ݄೔ 9:00AM(JST) ʹ࣮ߦ • ೔Ҏ্ϝοηʔδ͕ແ͍

    νϟϯωϧ͕ର৅ͱͳΔΑ͏ ઃఆ • ϗϫΠτϦετΛ؀ڥม਺Ͱ ઃఆ 12 name: CI on: schedule: - cron: "0 0 1 * *" jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install dependencies run: | pip install -r requirements.txt - name: Run auto-archive run: | SLACK_TOKEN=$SLACK_TOKEN ¥ DRY_RUN=$DRY_RUN ¥ python slack_autoarchive.py env: SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} DRY_RUN: false DAYS_INACTIVE: 180 WHITELIST_KEYWORDS: 'general,times_' ADMIN_CHANNEL: activity .github/workflows/main.yml