guilhem / rss-issues-action

create issues from a syndication feed (RSS or Atom).

Home Page:https://github.com/marketplace/actions/rss-issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work if labels are not specified

di opened this issue · comments

If I don't include the labels field with this action, creating the issue fails with:

Warning: Fail create issue <ISSUE TITLE>: POST https://api.github.com/repos/<ORG>/<REPO>/issues: 422 Validation Failed [{Resource:Label Field:name Code:missing_field Message:}]

This seems to be due to always including the labels in the new issue request, even though it may be empty:

rss-issues-action/main.go

Lines 187 to 191 in 09f7548

issueRequest := &github.IssueRequest{
Title: &title,
Body: &body,
Labels: &labels,
}

I was able to work around this by configuring the action to add a label with the labels field.