You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i am using go sdk to create Repository with Rulesets, while Ruleset creation is working okay, if i set target branches like "main" "test", i get below error DEBUG events PUT https://api.github.com/repos/test/test/rulesets/6545754: 422 Validation Failed [{Resource: Field: Code: Message:Invalid target patterns: 'test', 'main'}]
after many trials and errors, i tried to set branches not like main, but as "refs/heads/main", this one worked, but issue is that now in repo settings i see targeted branches are set like "refs/heads/refs/heads/main".
So either API should allow setting branch patterns without refs/heads/ prefix, or it should not be appended after i am setting it on my side
BugSomething isn't working correctlyAPI and WebhooksDiscussions and conversations related to APIs or Webhooks
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Bug
Body
Hello, i am using go sdk to create Repository with Rulesets, while Ruleset creation is working okay, if i set target branches like "main" "test", i get below error
DEBUG events PUT https://api.github.com/repos/test/test/rulesets/6545754: 422 Validation Failed [{Resource: Field: Code: Message:Invalid target patterns: 'test', 'main'}]
after many trials and errors, i tried to set branches not like main, but as "refs/heads/main", this one worked, but issue is that now in repo settings i see targeted branches are set like "refs/heads/refs/heads/main".
So either API should allow setting branch patterns without refs/heads/ prefix, or it should not be appended after i am setting it on my side
Beta Was this translation helpful? Give feedback.
All reactions