ResolveCommentNodeID constructs a discussion comment node ID from a repository and a comment database ID. It fetches the repository's database ID via the API, then encodes the data into a "DC_" prefixed node ID.
(repo ghrepo.Interface, commentDatabaseID int64)
| 1288 | // repository and a comment database ID. It fetches the repository's database |
| 1289 | // ID via the API, then encodes the data into a "DC_" prefixed node ID. |
| 1290 | func (c *discussionClient) ResolveCommentNodeID(repo ghrepo.Interface, commentDatabaseID int64) (string, error) { |
| 1291 | meta, err := c.getRepositoryMeta(repo) |
| 1292 | if err != nil { |
| 1293 | return "", err |
| 1294 | } |
| 1295 | |
| 1296 | return "DC_" + api.EncodeNodeID(0, meta.DatabaseId, commentDatabaseID), nil |
| 1297 | } |
nothing calls this directly
no test coverage detected