Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

git-tar needs to clone with a unique path (including branch) #615

@alexellis

Description

@alexellis

git-tar needs to clone with a unique path (including branch)

Expected Behaviour

git-tar should clone to a path like: /tmp/owner/repo/branch to avoid conflicts

Current Behaviour

It clones to:

func clone(pushEvent sdk.PushEvent) (string, error) {
	workDir := os.TempDir()
	destPath := path.Join(workDir, path.Join(pushEvent.Repository.Owner.Login, pushEvent.Repository.Name))

This could lead to conflicts if building two branches on the same OFC installation

Possible Solution

  1. Enhance the path to avoid conflicts. (see: git-tar/function/ops.go)
  2. A fix must include a unit test - ideally one which mocks out the exec step to git clone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions