···9898 })
9999 }
100100101101- punchcard, err := MakePunchcard(
102102- e,
103103- orm.FilterEq("did", forDid),
104104- orm.FilterGte("date", time.Now().AddDate(0, -TimeframeMonths, 0)),
105105- )
106106- if err != nil {
107107- return nil, fmt.Errorf("error getting commits by did: %w", err)
108108- }
109109- for _, punch := range punchcard.Punches {
110110- if punch.Date.After(now) {
111111- continue
112112- }
113113-114114- monthsAgo := monthsBetween(punch.Date, now)
115115- if monthsAgo >= TimeframeMonths {
116116- // shouldn't happen; but times are weird
117117- continue
118118- }
119119-120120- idx := monthsAgo
121121- timeline.ByMonth[idx].Commits += punch.Count
122122- }
123123-124101 return &timeline, nil
125102}
126103
-18
appview/pages/funcmap.go
···332332 }
333333 return dict, nil
334334 },
335335- "queryParams": func(params ...any) (url.Values, error) {
336336- if len(params)%2 != 0 {
337337- return nil, errors.New("invalid queryParams call")
338338- }
339339- vals := make(url.Values, len(params)/2)
340340- for i := 0; i < len(params); i += 2 {
341341- key, ok := params[i].(string)
342342- if !ok {
343343- return nil, errors.New("queryParams keys must be strings")
344344- }
345345- v, ok := params[i+1].(string)
346346- if !ok {
347347- return nil, errors.New("queryParams values must be strings")
348348- }
349349- vals.Add(key, v)
350350- }
351351- return vals, nil
352352- },
353335 "deref": func(v any) any {
354336 val := reflect.ValueOf(v)
355337 if val.Kind() == reflect.Pointer && !val.IsNil() {
+1-1
appview/pages/templates/banner.html
···3030 <div class="mx-6">
3131 These services may not be fully accessible until upgraded.
3232 <a class="underline text-red-800 dark:text-red-200"
3333- href="https://docs.tangled.org/migrating-knots-and-spindles.html">
3333+ href="https://docs.tangled.org/migrating-knots-spindles.html#migrating-knots-spindles">
3434 Click to read the upgrade guide</a>.
3535 </div>
3636 </details>
···375375KNOT_SERVER_LISTEN_ADDR=127.0.0.1:5555
376376```
377377378378-If you run a Linux distribution that uses systemd, you can
379379-use the provided service file to run the server. Copy
380380-[`knotserver.service`](https://tangled.org/tangled.org/core/blob/master/systemd/knotserver.service)
378378+If you run a Linux distribution that uses systemd, you can use the provided
379379+service file to run the server. Copy
380380+[`knotserver.service`](/systemd/knotserver.service)
381381to `/etc/systemd/system/`. Then, run:
382382383383```
···692692 NODE_ENV: "production"
693693 MY_ENV_VAR: "MY_ENV_VALUE"
694694```
695695-696696-By default, the following environment variables set:
697697-698698-- `CI` - Always set to `true` to indicate a CI environment
699699-- `TANGLED_PIPELINE_ID` - The AT URI of the current pipeline
700700-- `TANGLED_REPO_KNOT` - The repository's knot hostname
701701-- `TANGLED_REPO_DID` - The DID of the repository owner
702702-- `TANGLED_REPO_NAME` - The name of the repository
703703-- `TANGLED_REPO_DEFAULT_BRANCH` - The default branch of the
704704- repository
705705-- `TANGLED_REPO_URL` - The full URL to the repository
706706-707707-These variables are only available when the pipeline is
708708-triggered by a push:
709709-710710-- `TANGLED_REF` - The full git reference (e.g.,
711711- `refs/heads/main` or `refs/tags/v1.0.0`)
712712-- `TANGLED_REF_NAME` - The short name of the reference
713713- (e.g., `main` or `v1.0.0`)
714714-- `TANGLED_REF_TYPE` - The type of reference, either
715715- `branch` or `tag`
716716-- `TANGLED_SHA` - The commit SHA that triggered the pipeline
717717-- `TANGLED_COMMIT_SHA` - Alias for `TANGLED_SHA`
718718-719719-These variables are only available when the pipeline is
720720-triggered by a pull request:
721721-722722-- `TANGLED_PR_SOURCE_BRANCH` - The source branch of the pull
723723- request
724724-- `TANGLED_PR_TARGET_BRANCH` - The target branch of the pull
725725- request
726726-- `TANGLED_PR_SOURCE_SHA` - The commit SHA of the source
727727- branch
728695729696### Steps
730697