dashboard / erock/git-pr / feat: range diff #16 rss

accepted · opened on 2024-08-19T21:12:53Z by erock
Help
checkout latest patchset:
ssh pr.pico.sh print pr-16 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print ps-X | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 16
add review to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add --review 16
accept PR:
ssh pr.pico.sh pr accept 16
close PR:
ssh pr.pico.sh pr close 16
Timeline Patchsets

Range-diff rd-29

title
chore(pgs): add validation to project names
description
Patch changed
old #1
3bd44da
new #1
9002592
Back to top
1: 3bd44da ! 1: 9002592 chore(pgs): add validation to project names

old

old:shared/bucket.go new:shared/bucket.go
 	return fmt.Sprintf("static-%s", userID)
 }
 
+func ValidateProjectName(projectName string) error {
+	if projectName == "pico-private" {
+		return fmt.Errorf("%s is an invalid project name", projectName)
+	}
+	return nil
+}
+
 func GetProjectName(entry *utils.FileEntry) string {
 	if entry.Mode.IsDir() && strings.Count(entry.Filepath, string(os.PathSeparator)) == 0 {
 		return entry.Filepath

new

old:shared/bucket.go new:shared/bucket.go
 	return fmt.Sprintf("static-%s", userID)
 }
 
+func ValidateProjectName(projectName string) error {
+	if projectName == "pico-private" || projectName == "pico-imgs" {
+		return fmt.Errorf("%s is an invalid project name", projectName)
+	}
+	return nil
+}
+
 func GetProjectName(entry *utils.FileEntry) string {
 	if entry.Mode.IsDir() && strings.Count(entry.Filepath, string(os.PathSeparator)) == 0 {
 		return entry.Filepath