Motivation#
Right now the cli assumes that all issues, etc are associated and available on the PDS of the current user. This doesn't actually make sense as soon as there are multiple collaborators, as they will be using different PDSs hosted on different services.
Instead we need to update to use an indexing service. For now constellation.microcosm.blue works.
This is an example of a web request that retrieves the first 100 records of type "sh.tangled.repo.issue" that match the repo DID "at://did:plc:b2mcbcamkwyznc5fkplwlxbf/sh.tangled.repo/3mef23waqwq22" which is stored in the issue records ".repo" path.
Enhancement#
Update the issue code to query constellation for all "sh.tangled.repo.issue" when listing repo issues. For each issue, also query for comment records (type "sh.tangled.repo.issue.comment") with ". issue" path matching the issues DID, and status updates (not sure of the type)
Acceptance Criteria#
- Update functions in
/src/lib/issues-api.tsto use constellation when querying for issues, comments, and status. This must be done in all places we're currently getting the set of records associated with a record including retrieving sets of issues associated with a repo, comments, issue status messages. - Confirm that retrieving a specific record will work when the record is not hosted on the users PDS. Issues created by other collaborators will be on their PDSs.
- Create a /src/lib/constellation.ts file to collect functions making constellation calls in one place.
Example records#
- issue = https://pdsls.dev/at://did:plc:b2mcbcamkwyznc5fkplwlxbf/sh.tangled.repo.issue/3mem6gdwjud2z
- issue comment = https://pdsls.dev/at://did:plc:b2mcbcamkwyznc5fkplwlxbf/sh.tangled.repo.issue.comment/3melwx2r3xf22
- repo = https://pdsls.dev/at://did:plc:b2mcbcamkwyznc5fkplwlxbf/sh.tangled.repo/3mef23waqwq22
- issue status (from tangled) = Unsure. I haven't found an example yet.
Closed by https://tangled.org/markbennett.ca/tangled-cli/pulls/5