From 270c362ed3dcc577b07f671235ac91592e51ce31 Mon Sep 17 00:00:00 2001 From: Ben Boral Date: Thu, 29 Jan 2026 18:23:50 -0600 Subject: [PATCH 1/4] remove sliceutils --- gitclone/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitclone/git.go b/gitclone/git.go index 76e02678..e279b366 100644 --- a/gitclone/git.go +++ b/gitclone/git.go @@ -3,11 +3,11 @@ package gitclone import ( "fmt" "path/filepath" + "slices" "strings" "github.com/bitrise-io/go-utils/command/git" "github.com/bitrise-io/go-utils/pathutil" - "github.com/bitrise-io/go-utils/sliceutil" ) const ( @@ -193,7 +193,7 @@ func handleCheckoutError(callback getAvailableBranches, tag string, err error, s branches := branchesByRemote[originRemoteName] // There was no error grabbing the available branches // And the current branch is not present in the list - if branchesErr == nil && !sliceutil.IsStringInSlice(branch, branches) { + if branchesErr == nil && !slices.Contains(branches, branch) { return newStepErrorWithBranchRecommendations( tag, err, From 610c7a714e417d4af43c67ea210a0d1b77d48505 Mon Sep 17 00:00:00 2001 From: Szabolcs Toth <54896607+tothszabi@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:46:36 +0100 Subject: [PATCH 2/4] wip --- bitrise.yml | 5 ++++- docs/contribution.md | 1 + docs/examples.md | 0 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docs/contribution.md create mode 100644 docs/examples.md diff --git a/bitrise.yml b/bitrise.yml index b1b43b2f..8ef97a1a 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -32,4 +32,7 @@ workflows: generate_readme: steps: - - git::https://github.com/bitrise-steplib/steps-readme-generator.git@main: { } + - git::https://github.com/bitrise-steplib/steps-readme-generator.git@main: + inputs: + - contrib_section: docs/contribution.md + - example_section: docs/examples.md diff --git a/docs/contribution.md b/docs/contribution.md new file mode 100644 index 00000000..0776e35c --- /dev/null +++ b/docs/contribution.md @@ -0,0 +1 @@ +Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass. \ No newline at end of file diff --git a/docs/examples.md b/docs/examples.md new file mode 100644 index 00000000..e69de29b From 7e3f026f2c573a636ed6b11191034d1d640b0144 Mon Sep 17 00:00:00 2001 From: Szabolcs Toth <54896607+tothszabi@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:48:02 +0100 Subject: [PATCH 3/4] wip --- bitrise.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 8ef97a1a..841eb2ac 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -32,7 +32,7 @@ workflows: generate_readme: steps: - - git::https://github.com/bitrise-steplib/steps-readme-generator.git@main: - inputs: - - contrib_section: docs/contribution.md - - example_section: docs/examples.md + - git::https://github.com/bitrise-steplib/steps-readme-generator.git@main: + inputs: + - contrib_section: docs/contribution.md + - example_section: docs/examples.md From 85d822e621280a47af45b92af0256333f78fdc1d Mon Sep 17 00:00:00 2001 From: Szabolcs Toth <54896607+tothszabi@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:54:10 +0100 Subject: [PATCH 4/4] wip --- README.md | 14 ++++++++------ step.yml | 8 ++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d52c2d4d..92d93159 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ By default, the Step performs a shallow clone in most cases (fetching only the l ## 🧩 Get started -Add this step directly to your workflow in the [Bitrise Workflow Editor](https://devcenter.bitrise.io/steps-and-workflows/steps-and-workflows-index/). +Add this step directly to your workflow in the [Bitrise Workflow Editor](https://docs.bitrise.io/en/bitrise-ci/workflows-and-pipelines/steps/adding-steps-to-a-workflow.html). You can also run this step directly with [Bitrise CLI](https://github.com/bitrise-io/bitrise). @@ -50,6 +50,8 @@ You can also run this step directly with [Bitrise CLI](https://github.com/bitris | Key | Description | Flags | Default | | --- | --- | --- | --- | | `merge_pr` | This only applies to builds triggered by pull requests. Options: - `yes`: Depending on the information in the build trigger, either fetches the PR merge ref or creates the merged state locally. - `no`: Checks out the head of the PR branch without merging it into the destination branch. | | `yes` | +| `git_http_username` | Username for establishing an HTTP(S) connection to the repository. This is typically required when the repository is private. | sensitive | `$GIT_HTTP_USERNAME` | +| `git_http_password` | Personal access token (or password) for establishing an HTTP(S) connection to the repository. This is typically required when the repository is private. | sensitive | `$GIT_HTTP_PASSWORD` | | `clone_into_dir` | Local directory where the repository is cloned | required | `$BITRISE_SOURCE_DIR` | | `clone_depth` | Limit fetching to the specified number of commits. By default, the Step tries to do a shallow clone (depth of 1) if it's possible based on the build trigger parameters. If it's not possible, it applies a low depth value, unless another value is specified here. It's not recommended to define this input because a shallow clone ensures fast clone times. Examples of when you want to override the clone depth: - A Step in the workflow reads the commit history in order to generate a changelog - A Step in the workflow runs a git diff against a previous commit Use the value `-1` to disable the depth limit completely and fetch the entire repo history. | | | | `update_submodules` | Update registered submodules to match what the superproject expects. If set to `no`, `git fetch` calls will use the `--no-recurse-submodules` flag. | | `yes` | @@ -66,10 +68,9 @@ You can also run this step directly with [Bitrise CLI](https://github.com/bitris | `pull_request_unverified_merge_branch` | This input is the same as **Pull request merge ref**, but the provided merge ref can be potentially outdated. The Step will make an attempt to check it's validity and only use it for the checkout if it's up-to-date with the PR head. | | `$BITRISEIO_PULL_REQUEST_UNVERIFIED_MERGE_BRANCH` | | `pull_request_head_branch` | Git ref pointing to the head of the PR branch. Even if the source of the PR is a fork, this is a reference to the destination repository. Example: `refs/pull/14/head` Note: not all Git services provide this value. | | `$BITRISEIO_PULL_REQUEST_HEAD_BRANCH` | | `reset_repository` | Reset repository contents with `git reset --hard HEAD` and `git clean -f` before fetching. | | `No` | +| `performance_monitoring` | Prints extra performance related information for every git operation. | | `no` | | `build_url` | Unique build URL of this build on Bitrise.io | | `$BITRISE_BUILD_URL` | | `build_api_token` | The build's API Token for the build on Bitrise.io | sensitive | `$BITRISE_BUILD_API_TOKEN` | -| `git_http_username` | Username for establishing an HTTP(S) connection to the repository | sensitive | `$GIT_HTTP_USERNAME` | -| `git_http_password` | Personal access token (or password) for establishing an HTTP(S) connection to the repository | sensitive | `$GIT_HTTP_PASSWORD` |
@@ -91,9 +92,10 @@ You can also run this step directly with [Bitrise CLI](https://github.com/bitris We welcome [pull requests](https://github.com/bitrise-steplib/steps-git-clone/pulls) and [issues](https://github.com/bitrise-steplib/steps-git-clone/issues) against this repository. -For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://devcenter.bitrise.io/bitrise-cli/run-your-first-build/). +For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://docs.bitrise.io/en/bitrise-ci/bitrise-cli/running-your-first-local-build-with-the-cli.html). + +Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass. Learn more about developing steps: -- [Create your own step](https://devcenter.bitrise.io/contributors/create-your-own-step/) -- [Testing your Step](https://devcenter.bitrise.io/contributors/testing-and-versioning-your-steps/) +- [Create your own step](https://docs.bitrise.io/en/bitrise-ci/workflows-and-pipelines/developing-your-own-bitrise-step/developing-a-new-step.html) diff --git a/step.yml b/step.yml index 9616a4d5..20fda60f 100644 --- a/step.yml +++ b/step.yml @@ -58,12 +58,20 @@ inputs: - git_http_username: $GIT_HTTP_USERNAME opts: title: Username for establishing an HTTP(S) connection to the repository + description: |- + Username for establishing an HTTP(S) connection to the repository. + + This is typically required when the repository is private. is_dont_change_value: true is_sensitive: true - git_http_password: $GIT_HTTP_PASSWORD opts: title: Personal access token (or password) for establishing an HTTP(S) connection to the repository + description: |- + Personal access token (or password) for establishing an HTTP(S) connection to the repository. + + This is typically required when the repository is private. is_dont_change_value: true is_sensitive: true