matrix-org / go-neb

Extensible matrix bot written in Go
Apache License 2.0
285 stars 91 forks source link

Add support for GitHub labels when creating a new issue #358

Closed novocaine closed 2 years ago

novocaine commented 3 years ago

Augmented the current m.room.bot.options format for the github integration to support new_issue_labels, a comma separated list of label names that will be added to the issue.

This is useful for triggering subsequent automation from bot-created issues.

This partly addresses https://github.com/matrix-org/go-neb/issues/349 - although that issue notes that not everyone will have permission to add labels. I didn't attempt to address that here; this feature will just be less useful for those particular cases.

t3chguy commented 2 years ago

Configuration event:

{
  "github": {
    "default_repo": "vector-im/element-web",
    "new_issue_labels": [
      "X-Command"
    ]
  }
}

For a user with permissions to set labels for issue creation: https://github.com/vector-im/element-web/issues/21736 And without (no label is added): https://github.com/vector-im/element-web/issues/21739

Half-Shot commented 2 years ago

That was easy