🙌

GitHub tips

2025/02/05に公開

やること

新しいオーガナイゼーションに入ったとき

オーガナイゼーション内の通知を会社メールに送信する

https://github.com/settings/notifications/custom_routing

参考
https://zenn.dev/siketyan/articles/you-are-not-using-github-correctly

GitHub Project

ワークフロー

issueがcloseされた際にprojectのステータスも変わるが、それはここの設定による。
https://github.com/users/<user id>/projects/<project id>/workflows

GitHub Action

https://docs.github.com/ja/actions/

issueをアサインされたらdiscordに通知

name: issue assigned
on:
  issues:
    types:
      - assigned
jobs:
  discord:
    name: discord
    runs-on: ubuntu-latest
    steps:
      - uses: sarisia/actions-status-discord@v1
        if: always()
        with:
          webhook: ${{ secrets.DISCORD_WEBHOOK }}
          nodetail: true
          title: "assigned! ${{github.event.issue.title}}"
          description: |
            Click [here](https://github.com/xxxxxx/xxxxxx/issues/${{github.event.issue.number}})
          color: 0xff91a4

他tips

https://zenn.dev/nag8/articles/a2b5f5823586fd

一度kickしたアカウントを再招待する場合

過去の設定を保持するか(同じteam)、初期から始めるか選択できる。

参考
https://note.sarisia.cc/entry/actions-status-discord/

GitHub GraphQL API

ドキュメント
https://docs.github.com/graphql

リファレンス
https://docs.github.com/ja/graphql/reference/objects

エクスプローラー
https://docs.github.com/ja/graphql/overview/explorer

アクセストークン設定画面
https://github.com/settings/personal-access-tokens

GitHub REST API

ドキュメント
https://docs.github.com/rest

GitHub CLI

https://cli.github.com/manual/gh_issue
issueの概要欄に日付があるもののリスト

$ gh issue list --state open --search "2025/02/09 in:body" --json number --jq 

Audit log








Discussion