Class: MultiRepo::Helpers::UpdateRepoSettings
- Inherits:
-
Object
- Object
- MultiRepo::Helpers::UpdateRepoSettings
- Defined in:
- lib/multi_repo/helpers/update_repo_settings.rb
Instance Attribute Summary collapse
-
#github ⇒ Object
readonly
Returns the value of attribute github.
-
#repo_name ⇒ Object
readonly
Returns the value of attribute repo_name.
Instance Method Summary collapse
-
#initialize(repo_name, dry_run: false) ⇒ UpdateRepoSettings
constructor
A new instance of UpdateRepoSettings.
- #run ⇒ Object
Constructor Details
#initialize(repo_name, dry_run: false) ⇒ UpdateRepoSettings
Returns a new instance of UpdateRepoSettings.
5 6 7 8 |
# File 'lib/multi_repo/helpers/update_repo_settings.rb', line 5 def initialize(repo_name, dry_run: false, **) @repo_name = repo_name @github = MultiRepo::Service::Github.new(dry_run: dry_run) end |
Instance Attribute Details
#github ⇒ Object (readonly)
Returns the value of attribute github.
3 4 5 |
# File 'lib/multi_repo/helpers/update_repo_settings.rb', line 3 def github @github end |
#repo_name ⇒ Object (readonly)
Returns the value of attribute repo_name.
3 4 5 |
# File 'lib/multi_repo/helpers/update_repo_settings.rb', line 3 def repo_name @repo_name end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/multi_repo/helpers/update_repo_settings.rb', line 10 def run settings = { :has_wiki => false, :has_projects => false, :allow_merge_commit => true, :allow_rebase_merge => false, :allow_squash_merge => false, } puts "Editing #{repo_name}" github.edit_repository(repo_name, settings) end |