class Fastlane::Actions::RemoveGitRemoteAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 48
def self.authors
  ["Marcin Stepnowski"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 24
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :remote,
                   env_name: "FL_REMOVE_GIT_REMOTE_REMOTE",
                   description: "Remote name",
                   optional: false,
                   type: String)
  ]
end
category() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 40
def self.category
  :source_control
end
description() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 13
def self.description
  "This will remove a remote repository"
end
details() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 17
def self.details
  [
    "This will automatically remove a remote repository, where:",
    "- `remote` is the remote name"
  ].join("\n")
end
example_code() click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 34
def self.example_code
  [
    'remove_git_remote(remote: "origin")'
  ]
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 44
def self.is_supported?(platform)
  true
end
run(options) click to toggle source
# File lib/fastlane/plugin/menigit/actions/remove_git_remote.rb, line 6
def self.run(options)
  remote = options[:remote]

  UI.message("Removing remote #{remote} 🎯.")
  Actions.sh("git remote rm #{remote.shellescape}")
end