Skip to content

Commit cd0bd2d

Browse files
committed
push validation of prefex
1 parent 1af72d4 commit cd0bd2d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

github/resource_github_repository_autolink_reference.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ func resourceGithubRepositoryAutolinkReference() *schema.Resource {
6565
Description: "The repository name",
6666
},
6767
"key_prefix": {
68-
Type: schema.TypeString,
69-
Required: true,
70-
ForceNew: true,
71-
Description: "This prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit",
68+
Type: schema.TypeString,
69+
Required: true,
70+
ForceNew: true,
71+
Description: "This prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit",
72+
ValidateDiagFunc: validation.ToDiagFunc(validation.StringMatch(regexp.MustCompile(`^.*?[^\d]$`), "must not end with a number")),
7273
},
7374
"target_url_template": {
7475
Type: schema.TypeString,

0 commit comments

Comments
 (0)