Repository navigation
Ensure to generate file creation URL - #635
Merged
Merged
Conversation
Collaborator
|
The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use Details1. Allow users to specify git hostThis was created by todo plugin since "TODO:" was found in 45fe033 when #635 was merged. cc: @nakabonne. |
Member
Author
|
/todo skip |
Member
Author
|
/cc @cakecatz |
Collaborator
|
Code coverage for golang is
|
nghialv
reviewed
Aug 17, 2020
| repeated DeploymentConfigTemplateLabel labels = 3; | ||
| string content = 4 [(validate.rules).string.min_len = 1]; | ||
| // An HTML link to create a new file under the git path, with template content as default value. | ||
| string file_creation_link = 5; |
nghialv
reviewed
Aug 17, 2020
| } | ||
| for _, t := range templates { | ||
| g := app.GetGitPath() | ||
| t.FileCreationLink, err = git.MakeFileCreationURL(g.GetRepo().GetRemote(), g.GetPath(), g.GetRepo().GetBranch(), ".pipe.yaml", t.Content) |
Member
There was a problem hiding this comment.
nit: g.Repo.Remote, g.Repo.Branch, g.Path
Member
There was a problem hiding this comment.
The file name should be the specified one if config_file_name was not nil.
Member
|
Very nice feature. |
Member
Author
|
Fixed |
Member
|
Thank you. |
Collaborator
Collaborator
|
Code coverage for golang is
|
Collaborator
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Each deployment config template comes with a file creation URL, which is for creating a new file under the git path, with template content as default value. Something like:
https://github.com/pipe-cd/debug/new/master/kubernetes/analysis-by-metrics?filename=.pipe.yaml&value=%23+This+configures+a+non-progressive+delivery.%0AapiVersion%3A+pipecd.dev%2Fv1beta1%0Akind%3A+KubernetesApp%0Aspec%3A%0A++input%3A%0A++++manifests%3A%0A++++++-+deployment.yaml%0A++++++-+service.yaml%0A++++kubectlVersion%3A+2.1.1
Whereas, I'm getting an issue about specifying filename: isaacs/github#1527. I'll be glad to address it later.
Which issue(s) this PR fixes:
Fixes #627
Does this PR introduce a user-facing change?: