Class: Fastlane::Actions::CloseMilestoneAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::CloseMilestoneAction
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
23 24 25 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 23 def self. ['Automattic'] end |
.available_options ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 36 def self. [ FastlaneCore::ConfigItem.new(key: :repository, env_name: 'GHHELPER_REPOSITORY', description: 'The remote path of the GH repository on which we work', optional: false, type: String), FastlaneCore::ConfigItem.new(key: :milestone, env_name: 'GHHELPER_MILESTONE', description: 'The GitHub milestone', optional: false, type: String), Fastlane::Helper::GithubHelper.github_token_config_item, ] end |
.description ⇒ Object
19 20 21 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 19 def self.description 'Closes an existing milestone in the project' end |
.details ⇒ Object
31 32 33 34 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 31 def self.details # Optional: 'Closes an existing milestone in the project' end |
.is_supported?(platform) ⇒ Boolean
52 53 54 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 52 def self.is_supported?(platform) true end |
.return_value ⇒ Object
27 28 29 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 27 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb', line 7 def self.run(params) repository = params[:repository] milestone_title = params[:milestone] github_helper = Fastlane::Helper::GithubHelper.new(github_token: params[:github_token]) milestone = github_helper.get_milestone(repository, milestone_title) UI.user_error!("Milestone #{milestone_title} not found.") if milestone.nil? github_helper.update_milestone(repository: repository, number: milestone[:number], state: 'closed') end |