Skip to content

feat: Add auto team assign workflow for internal-employees#280

Closed
h-wata wants to merge 1 commit into
mainfrom
feature/auto-team-assign
Closed

feat: Add auto team assign workflow for internal-employees#280
h-wata wants to merge 1 commit into
mainfrom
feature/auto-team-assign

Conversation

@h-wata

@h-wata h-wata commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 新規リポジトリ作成時に internal-employees チームを push 権限で自動追加するワークフローを追加
  • repository: created イベントをトリガーに gh api で Team にリポジトリを追加
  • Org Secret ORG_ADMIN_TOKEN は設定済み(visibility: selected → .github のみ)

実施済み

  • internal-employees Team 作成済み
  • 既存の全リポジトリを push 権限で追加済み
  • ORG_ADMIN_TOKEN を Org Secrets に設定済み

Test plan

  • 新規テストリポジトリを作成して、internal-employees Team に自動追加されることを確認

Closes #279

🤖 Generated with Claude Code

新規リポジトリ作成時にinternal-employeesチームをpush権限で自動追加する。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jsupratman13

jsupratman13 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

気になったのですが、ここではなく
https://github.com/organizations/sbgisen/settings とかに入れるべきですか?(あるかどうか分からないが)

ここに入れてしまうと、templateを使った新しいレポジトリの時に実行するのでは?

@Tacha-S

Tacha-S commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

そもそもこんなリポジトリをまたいだイベントってトリガーするんですか?
このworkflowを新規リポジトリで実行するんですかね?

@h-wata

h-wata commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

そもそもこんなリポジトリをまたいだイベントってトリガーするんですか? このworkflowを新規リポジトリで実行するんですかね?

気になったのですが、ここではなく https://github.com/organizations/sbgisen/settings とかに入れるべきですか?(あるかどうか分からないが)

ここに入れてしまうと、templateを使った新しいレポジトリの時に実行するのでは?

ご指摘のとおりでした。このトリガーは動かないようでした。やり方含めてもう少し検討します。

@h-wata h-wata closed this Mar 19, 2026
@Tacha-S

Tacha-S commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

気になったのですが、ここではなく github.com/organizations/sbgisen/settings とかに入れるべきですか?(あるかどうか分からないが)

ここに入れてしまうと、templateを使った新しいレポジトリの時に実行するのでは?

ここは別にcomposite actionとか共通のworkflowを呼び出せるようにおいている場なので、ここに追加しようがtemplate repository側で呼び出すような上位のworkflowを置かない限りは新しいrepositoryにて実行はされないはずなので、これを気にする必要はないと思います。

@h-wata h-wata deleted the feature/auto-team-assign branch March 19, 2026 09:05
@h-wata

h-wata commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

気になったのですが、ここではなく github.com/organizations/sbgisen/settings とかに入れるべきですか?(あるかどうか分からないが)
ここに入れてしまうと、templateを使った新しいレポジトリの時に実行するのでは?

ここは別にcomposite actionとか共通のworkflowを呼び出せるようにおいている場なので、ここに追加しようがtemplate repository側で呼び出すような上位のworkflowを置かない限りは新しいrepositoryにて実行はされないはずなので、これを気にする必要はないと思います。

コメントありがとうございます。承知しました。

ただ、考え直して今回やりたいことを実施する場合は、Admin権限でmemberの操作を許可するTokenを付与する必要があるので、公開リポジトリでやることではないと判断しました。
そのため別途Privateのリポジトリを作成し、試してみたいと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Org のベースパーミッションを見直し、Team ベースの権限管理に移行する

3 participants