Skip to content

Unable to create Repo Ruleset if RepositoryName fields are empty #2909

@ysoldak

Description

@ysoldak

Same as #2809 but for RepositoryName conditions.

Receiving same error 422 Validation Failed [{Resource: Field: Code: Message:Invalid target patterns: ''}] when "exclude" is empty and omitted.

Expected Behavior:
The github.Ruleset struct should include all the necessary fields to create a GitHub Ruleset, ensuring that no required fields are omitted, allow users to create ruleset successfully without encountering any errors.

Steps to Reproduce:
Both conditions.repository_name.include and conditions.repository_name.exclude fields are required even when empty.

Additional Information:
go-github library version: v54.0.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions