Module: HybridPlatformsConductor::CommonConfigDsl::Github
- Defined in:
- lib/hybrid_platforms_conductor/common_config_dsl/github.rb
Overview
Add common Github config DSL to declare known Github repositories
Instance Attribute Summary collapse
-
#known_github_repos ⇒ Object
readonly
List of Github repositories Array< Hash<Symbol, Object> > * user (String): User or organization name, storing repositories * url (String): URL to the Github API * repos (Array<String> or Symbol): List of repository names from this project, or :all for all.
Instance Method Summary collapse
-
#github_repos(user:, url: 'https://api.github.com', repos: :all) ⇒ Object
Register new Github repositories.
-
#init_github ⇒ Object
Initialize the DSL.
Instance Attribute Details
#known_github_repos ⇒ Object (readonly)
List of Github repositories Array< Hash<Symbol, Object> >
-
user (String): User or organization name, storing repositories
-
url (String): URL to the Github API
-
repos (Array<String> or Symbol): List of repository names from this project, or :all for all
13 14 15 |
# File 'lib/hybrid_platforms_conductor/common_config_dsl/github.rb', line 13 def known_github_repos @known_github_repos end |
Instance Method Details
#github_repos(user:, url: 'https://api.github.com', repos: :all) ⇒ Object
Register new Github repositories
- Parameters
-
user (String): User or organization name, storing repositories
-
url (String): URL to the Github API [default: ‘api.github.com’]
-
repos (Array<String> or Symbol): List of repository names from this project, or :all for all [default: :all]
29 30 31 32 33 34 35 |
# File 'lib/hybrid_platforms_conductor/common_config_dsl/github.rb', line 29 def github_repos(user:, url: 'https://api.github.com', repos: :all) @known_github_repos << { url: url, user: user, repos: repos } end |
#init_github ⇒ Object
Initialize the DSL
16 17 18 19 20 21 |
# File 'lib/hybrid_platforms_conductor/common_config_dsl/github.rb', line 16 def init_github # List of Github repositories definitions # Array< Hash<Symbol, Object> > # Each definition is just mapping the signature of #github_repos @known_github_repos = [] end |