@@ -60,41 +60,42 @@ github:
6060
61611) You can now use the following API to get GitHub information about that team :
6262
63- ` ` ` ruby
64- team = CodeTeams.find('My Team')
65- members = team.github.members
66- github_name = team.github.team
67- ` ` `
63+ ` ` ` ruby
64+ team = CodeTeams.find('My Team')
65+ members = team.github.members
66+ github_name = team.github.team
67+ ` ` `
6868
69- Alternatively, you can assign an accessor method name that differs from the plugin's class name :
69+ Alternatively, you can assign an accessor method name that differs from the plugin's class name :
7070
71- ` ` ` ruby
72- class MyPlugin < CodeTeams::Plugin
73- data_accessor_name :other_name
71+ ` ` ` ruby
72+ class MyPlugin < CodeTeams::Plugin
73+ data_accessor_name :other_name
7474
75- def other_name
76- # ...
75+ def other_name
76+ # ...
77+ end
7778 end
78- end
7979
80- # You can then use:
81- team.other_name
82- # similarly to the Github example above
83- # You can then access data in the following manner:
84- team.other_name.attribute_name
85- ` ` `
80+ # You can then use:
81+ team.other_name
82+ # similarly to the Github example above
83+ # You can then access data in the following manner:
84+ team.other_name.attribute_name
85+ ` ` `
8686
87- However, to avoid confusion, it's recommended to use the naming convention
88- whenever possible so that your accessor name matches your plugin's name
87+ However, to avoid confusion, it's recommended to use the naming convention
88+ whenever possible so that your accessor name matches your plugin's name
8989
90902) Running team validations (see below) will ensure all teams have a GitHub team specified
9191
92- Your plugins can be as simple or as complex as you want. Here are some other things we use plugins for :
93- - Identifying which teams own which feature flags
94- - Mapping teams to specific portions of the code through `code_ownership`
95- - Allowing teams to protect certain files and require approval on modification of certain files
96- - Specifying owned dependencies (Ruby gems, JavaScript packages, and more)
97- - Specifying how to get in touch with the team via Slack (their channel and handle)
92+ Your plugins can be as simple or as complex as you want. Here are some other things we use plugins for :
93+
94+ - Identifying which teams own which feature flags
95+ - Mapping teams to specific portions of the code through `code_ownership`
96+ - Allowing teams to protect certain files and require approval on modification of certain files
97+ - Specifying owned dependencies (Ruby gems, JavaScript packages, and more)
98+ - Specifying how to get in touch with the team via Slack (their channel and handle)
9899
99100# # Configuration
100101You'll want to ensure that all teams are valid in your CI environment. We recommend running code like this in CI :
0 commit comments