-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1278c8d
commit f45003b
Showing
10 changed files
with
193 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
LOCAL_AZURE_ACCESS_TOKEN= | ||
LOCAL_GITHUB_ACCESS_TOKEN= | ||
DEPENDABOT_PROVIDER= | ||
DEPENDABOT_PACKAGE_MANAGER= | ||
DEPENDABOT_REPO= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ testdata/caches | |
cache | ||
out.yaml | ||
./dependabot | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package model | ||
|
||
import "strings" | ||
|
||
type AzureRepo struct { | ||
PackageManger string | ||
Org string | ||
Project string | ||
Repo string | ||
Directory string | ||
} | ||
|
||
// NewAzureRepo parses a repo string and returns an AzureRepo struct | ||
// Expects a repo string in the format org/project/repo | ||
func NewAzureRepo(packageManager string, repo string, directory string) *AzureRepo { | ||
repoParts := strings.Split(repo, "/") | ||
for i, part := range repoParts { | ||
println(i, part) | ||
} | ||
if len(repoParts) != 3 { | ||
return nil | ||
} | ||
|
||
return &AzureRepo{ | ||
PackageManger: packageManager, | ||
Org: repoParts[0], | ||
Project: repoParts[1], | ||
Repo: repoParts[2], | ||
Directory: directory, | ||
} | ||
} |
Oops, something went wrong.