Skip to content

Commit

Permalink
Auto merge pull request #636 from atomist/sdm
Browse files Browse the repository at this point in the history
* Add targets.branch to code transforms

* Update to latest matching automation-client version
  • Loading branch information
cdupuis authored and atomist-bot committed Dec 20, 2018
1 parent 2c9adf4 commit 1e1a125
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 132 deletions.
9 changes: 6 additions & 3 deletions lib/api/command/target/BitBucketRepoTargets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ export class BitBucketRepoTargets extends TargetsParams implements FallbackParam
@MappedParameter(MappedParameters.GitHubRepository, false)
public repo: string;

@Parameter({ description: "Branch or ref. Defaults to 'master'", ...validationPatterns.GitBranchRegExp, required: false })
public sha: string = "master";
@Parameter({ description: "Ref", ...validationPatterns.GitShaRegExp, required: false })
public sha: string;

@Parameter({ description: "Branch Defaults to 'master'", ...validationPatterns.GitBranchRegExp, required: false })
public branch: string = "master";

@Parameter({ description: "regex", required: false })
public repos: string = ".*";
Expand All @@ -68,7 +71,7 @@ export class BitBucketRepoTargets extends TargetsParams implements FallbackParam
this.apiUrl,
this.owner, this.repo,
true,
this.sha) :
this.branch ? this.branch : this.sha) :
undefined;
}

Expand Down
7 changes: 5 additions & 2 deletions lib/api/command/target/GitHubRepoTargets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ export class GitHubRepoTargets extends GitHubTargetsParams implements FallbackPa
@MappedParameter(MappedParameters.GitHubRepository, false)
public repo: string;

@Parameter({ description: "Branch or ref. Defaults to 'master'", ...validationPatterns.GitBranchRegExp, required: false })
public sha: string = "master";
@Parameter({ description: "Ref", ...validationPatterns.GitShaRegExp, required: false })
public sha: string;

@Parameter({ description: "Branch", ...validationPatterns.GitBranchRegExp, required: false })
public branch: string = "master";

@Parameter({ description: "regex", required: false })
public repos: string;
Expand Down
Loading

0 comments on commit 1e1a125

Please sign in to comment.