Public | Automated Build

Last pushed: 2 months ago
Short Description
A https://www.dependencies.io actor for doing find and replace in repo, then creating a PR.
Full Description

actor-find-replace





A dependencies.io
actor
that does a basic text find and replace of versions in repo files, then creates
a pull request.

Usage

If you want to replace text in specific files, then use the paths setting.
Additionally, if you're worried about replacing the wrong strings then you can
use pattern to further define the string that is found and replaced using
variables from the dependency.

dependencies.yml

collectors:
- ...
  actors:
  - type: find-replace
    settings:  # all settings are optional
      paths:  # files to do the replacement in (otherwise will use the file the dependency was collected from)
      - README.md
      # pattern that sed will find/replace
      # can use `name`, `version`, `version_clean`, `source`, and `path` of the dependency
      # defaults to {version} to only replace based on the version numbers
      patterns:
      - '{name}: {version}'

      # github options
      github_labels:  # list of label names
      - bug
      github_assignees:  # list of usernames
      - davegaeddert
      github_milestone: 3  # milestone number
      github_base_branch: develop  # branch to make PR against (if something other than your default branch)

      # gitlab options
      gitlab_assignee_id: 1  # assignee user ID
      gitlab_labels:  # labels for MR as a list of strings
      - dependencies
      - update
      gitlab_milestone_id: 1  # the ID of a milestone
      gitlab_target_project_id: 1  # The target project (numeric id)
      gitlab_remove_source_branch: true  # flag indicating if a merge request should remove the source branch when merging
      gitlab_target_branch: develop  # branch to make PR against (if something other than your default branch)

Pattern args

  • name - dependency.name name of the dependency
  • version - version string
  • version_clean - version with leading "v" or "=" removed
  • source - dependency.source (ex. "npm", "pypi", "git", etc.)
  • path - dependency.path path that the collector gave for where this is installed at (ex. app/package.json)

Works well with

Resources

Support

Any questions or issues with this specific actor should be discussed in GitHub
issues
. If there is
private information which needs to be shared then you can instead use the
dependencies.io support.

Docker Pull Command
Owner
dependencies

Comments (0)