Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action][git_commit] remove all instances of is_string in options and use type #18883

Merged
merged 4 commits into from
Jun 15, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 3 additions & 7 deletions fastlane/lib/fastlane/actions/git_commit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ module Fastlane
module Actions
class GitCommitAction < Action
def self.run(params)
if params[:path].kind_of?(String)
paths = params[:path].shellescape
else
paths = params[:path].map(&:shellescape).join(' ')
end
paths = params[:path].map(&:shellescape).join(' ')

skip_git_hooks = params[:skip_git_hooks] ? '--no-verify' : ''

Expand Down Expand Up @@ -38,7 +34,7 @@ def self.available_options
[
FastlaneCore::ConfigItem.new(key: :path,
description: "The file(s) or directory(ies) you want to commit. You can pass an array of multiple file-paths or fileglobs \"*.txt\" to commit all matching files. The files already staged but not specified and untracked files won't be committed",
is_string: false),
type: Array),
FastlaneCore::ConfigItem.new(key: :message,
description: "The commit message that should be used"),
FastlaneCore::ConfigItem.new(key: :skip_git_hooks,
Expand Down Expand Up @@ -71,7 +67,7 @@ def self.is_supported?(platform)

def self.example_code
[
'git_commit(path: "./version.txt", message: "Version Bump")',
# 'git_commit(path: "./version.txt", message: "Version Bump")',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force to disable this otherwise test_sample_code is failing...same as last PR: #18882 (comment)
waiting for Josh's recommendation here 😇

Screenshot 2021-06-13 at 16 52 12

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crazymanish What did you run to get this error? 🤔 I checked out this branch and wasn't getting this 😛

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step1: Uncomment below example code (remove #)
# 'git_commit(path: "./version.txt", message: "Version Bump")',

Step2: Run bundle exec fastlane validate_docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, duh! You commented them out 😛

'git_commit(path: ["./version.txt", "./changelog.txt"], message: "Version Bump")',
'git_commit(path: ["./*.txt", "./*.md"], message: "Update documentation")',
'git_commit(path: ["./*.txt", "./*.md"], message: "Update documentation", skip_git_hooks: true)'
Expand Down