Merge pull request #4148 from n2ygk/git_ref

pass in the specified git branch ref when cloning a single branch
This commit is contained in:
Ben Lambert
2021-01-28 10:32:48 +01:00
committed by GitHub
11 changed files with 60 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
---
'@backstage/backend-common': patch
'@backstage/plugin-scaffolder-backend': patch
---
Honor the branch ref in the url when cloning.
This fixes a bug in the scaffolder prepare stage where a non-default branch
was specified in the scaffolder URL but the default branch was cloned.
For example, even though the `other` branch is specified in this example, the
`master` branch was actually cloned:
```yaml
catalog:
locations:
- type: url
target: https://github.com/backstage/backstage/blob/other/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml
```
This also fixes a 404 in the prepare stage for GitLab URLs.