···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.repo.tag
66+77+import (
88+ "bytes"
99+ "context"
1010+1111+ "github.com/bluesky-social/indigo/lex/util"
1212+)
1313+1414+const (
1515+ RepoTagNSID = "sh.tangled.repo.tag"
1616+)
1717+1818+// RepoTag calls the XRPC method "sh.tangled.repo.tag".
1919+//
2020+// repo: Repository identifier in format 'did:plc:.../repoName'
2121+// tag: Name of tag, such as v1.3.0
2222+func RepoTag(ctx context.Context, c util.LexClient, repo string, tag string) ([]byte, error) {
2323+ buf := new(bytes.Buffer)
2424+2525+ params := map[string]interface{}{}
2626+ params["repo"] = repo
2727+ params["tag"] = tag
2828+ if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.tag", params, nil, buf); err != nil {
2929+ return nil, err
3030+ }
3131+3232+ return buf.Bytes(), nil
3333+}
+14-2
api/tangled/repotree.go
···16161717// RepoTree_LastCommit is a "lastCommit" in the sh.tangled.repo.tree schema.
1818type RepoTree_LastCommit struct {
1919+ Author *RepoTree_Signature `json:"author,omitempty" cborgen:"author,omitempty"`
1920 // hash: Commit hash
2021 Hash string `json:"hash" cborgen:"hash"`
2122 // message: Commit message
···2728// RepoTree_Output is the output of a sh.tangled.repo.tree call.
2829type RepoTree_Output struct {
2930 // dotdot: Parent directory path
3030- Dotdot *string `json:"dotdot,omitempty" cborgen:"dotdot,omitempty"`
3131- Files []*RepoTree_TreeEntry `json:"files" cborgen:"files"`
3131+ Dotdot *string `json:"dotdot,omitempty" cborgen:"dotdot,omitempty"`
3232+ Files []*RepoTree_TreeEntry `json:"files" cborgen:"files"`
3333+ LastCommit *RepoTree_LastCommit `json:"lastCommit,omitempty" cborgen:"lastCommit,omitempty"`
3234 // parent: The parent path in the tree
3335 Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"`
3436 // readme: Readme for this file tree
···4345 Contents string `json:"contents" cborgen:"contents"`
4446 // filename: Name of the readme file
4547 Filename string `json:"filename" cborgen:"filename"`
4848+}
4949+5050+// RepoTree_Signature is a "signature" in the sh.tangled.repo.tree schema.
5151+type RepoTree_Signature struct {
5252+ // email: Author email
5353+ Email string `json:"email" cborgen:"email"`
5454+ // name: Author name
5555+ Name string `json:"name" cborgen:"name"`
5656+ // when: Author timestamp
5757+ When string `json:"when" cborgen:"when"`
4658}
47594860// RepoTree_TreeEntry is a "treeEntry" in the sh.tangled.repo.tree schema.
+24
appview/db/db.go
···11811181 return err
11821182 })
1183118311841184+ orm.RunMigration(conn, logger, "remove-profile-stats-column-constraint", func(tx *sql.Tx) error {
11851185+ _, err := tx.Exec(`
11861186+ -- create new table without the check constraint
11871187+ create table profile_stats_new (
11881188+ id integer primary key autoincrement,
11891189+ did text not null,
11901190+ kind text not null, -- no constraint this time
11911191+ foreign key (did) references profile(did) on delete cascade
11921192+ );
11931193+11941194+ -- copy data from old table
11951195+ insert into profile_stats_new (id, did, kind)
11961196+ select id, did, kind
11971197+ from profile_stats;
11981198+11991199+ -- drop old table
12001200+ drop table profile_stats;
12011201+12021202+ -- rename new table
12031203+ alter table profile_stats_new rename to profile_stats;
12041204+ `)
12051205+ return err
12061206+ })
12071207+11841208 return &DB{
11851209 db,
11861210 logger,
+7
appview/db/profile.go
···450450 case models.VanityStatRepositoryCount:
451451 query = `select count(id) from repos where did = ?`
452452 args = append(args, did)
453453+ case models.VanityStatStarCount:
454454+ query = `select count(id) from stars where subject_at like 'at://' || ? || '%'`
455455+ args = append(args, did)
456456+ case models.VanityStatNone:
457457+ return 0, nil
458458+ default:
459459+ return 0, fmt.Errorf("invalid vanity stat kind: %s", stat)
453460 }
454461455462 var result uint64
+1-1
appview/ingester.go
···317317 var stats [2]models.VanityStat
318318 for i, s := range record.Stats {
319319 if i < 2 {
320320- stats[i].Kind = models.VanityStatKind(s)
320320+ stats[i].Kind = models.ParseVanityStatKind(s)
321321 }
322322 }
323323
···502502Note that you should add a newline at the end if setting a non-empty message
503503since the knot won't do this for you.
504504505505+## Troubleshooting
506506+507507+If you run your own knot, you may run into some of these
508508+common issues. You can always join the
509509+[IRC](https://web.libera.chat/#tangled) or
510510+[Discord](https://chat.tangled.org/) if this section does
511511+not help.
512512+513513+### Unable to push
514514+515515+If you are unable to push to your knot or repository:
516516+517517+1. First, ensure that you have added your SSH public key to
518518+ your account
519519+2. Check to see that your knot has synced the key by running
520520+ `knot keys`
521521+3. Check to see if git is supplying the correct private key
522522+ when pushing: `GIT_SSH_COMMAND="ssh -v" git push ...`
523523+4. Check to see if `sshd` on the knot is rejecting the push
524524+ for some reason: `journalctl -xeu ssh` (or `sshd`,
525525+ depending on your machine). These logs are unavailable if
526526+ using docker.
527527+5. Check to see if the knot itself is rejecting the push,
528528+ depending on your setup, the logs might be in one of the
529529+ following paths:
530530+ * `/tmp/knotguard.log`
531531+ * `/home/git/log`
532532+ * `/home/git/guard.log`
533533+505534# Spindles
506535507536## Pipelines
···15611590Refer to the [jujutsu
15621591documentation](https://jj-vcs.github.io/jj/latest/config/#commit-trailers)
15631592for more information.
15931593+15941594+# Troubleshooting guide
15951595+15961596+## Login issues
15971597+15981598+Owing to the distributed nature of OAuth on AT Protocol, you
15991599+may run into issues with logging in. If you run a
16001600+self-hosted PDS:
16011601+16021602+- You may need to ensure that your PDS is timesynced using
16031603+ NTP:
16041604+ * Enable the `ntpd` service
16051605+ * Run `ntpd -qg` to synchronize your clock
16061606+- You may need to increase the default request timeout:
16071607+ `NODE_OPTIONS="--network-family-autoselection-attempt-timeout=500"`
16081608+16091609+## Empty punchcard
16101610+16111611+For Tangled to register commits that you make across the
16121612+network, you need to setup one of following:
16131613+16141614+- The committer email should be a verified email associated
16151615+ to your account. You can add and verify emails on the
16161616+ settings page.
16171617+- Or, the committer email should be set to your account's
16181618+ DID: `git config user.email "did:plc:foobar". You can find
16191619+ your account's DID on the settings page
16201620+16211621+## Commit is not marked as verified
16221622+16231623+Presently, Tangled only supports SSH commit signatures.
16241624+16251625+To sign commits using an SSH key with git:
16261626+16271627+```
16281628+git config --global gpg.format ssh
16291629+git config --global user.signingkey ~/.ssh/tangled-key
16301630+```
16311631+16321632+To sign commits using an SSH key with jj, add this to your
16331633+config:
16341634+16351635+```
16361636+[signing]
16371637+behavior = "own"
16381638+backend = "ssh"
16391639+key = "~/.ssh/tangled-key"
16401640+```
16411641+16421642+## Self-hosted knot issues
16431643+16441644+If you need help troubleshooting a self-hosted knot, check
16451645+out the [knot troubleshooting
16461646+guide](/knot-self-hosting-guide.html#troubleshooting).
···11-# KnotMirror
22-33-Mirror of all known repos. Heavily inspired by [indigo/relay] and [indigo/tap].
44-55-Knot Mirror syncs repo list using tap and subscribe to all known knots as KnotStream.
66-77-[indigo/relay]: https://github.com/bluesky-social/indigo/tree/main/cmd/relay
88-[indigo/tap]: https://github.com/bluesky-social/indigo/tree/main/cmd/tap