Use GraphQL to update repository information so that user webhooks are
delivered.
The notice for autocreated repositories has been updated to reflect that
autocreated repositories are no longer deleted automatically.
Use GraphQL to update repository information so that user webhooks are
delivered.
As a consequence of this, autocreated repositories will have a default
visibility of PRIVATE instead of 'autocreated', and will therefore not
be deleted.
Attempt to load the configuration file from the path specified in the
SRHT_CONFIG environment variable. If that fails, fallback to
/etc/sr.ht/config.ini.
Previously, a mutation which explicitly specified a null input would
cause the resolver to panic:
mutation {
updateRepository(id: 1, input: {name: null}) {
id
}
}
Check that the input is not nil before casting it to avoid this panic.
Replace the Query.repositoryByName and repositoryByOwner queries with a
new User.repository query which is more graph-like.
References: https://todo.sr.ht/~sircmpwn/sr.ht/309
Rewrite the web frontend to use GraphQL mutations where necessary to
ensure that GraphQL user webhooks are delivered. Most of the routes
defined by scm.sr.ht became part of git.sr.ht. A separate commit will
remove those routes from scm.sr.ht to avoid conflicts.
As a bonus, a new clone endpoint was added to facilitate easy cloning of
third-party repositories. A clone button was added to the user dashboard
to make this functionality easily accessible.
These are split, like in porcelain mode in CLI, when consecutive final
commit lines are non-consecutive in the originals (I think?)
Closes: https://todo.sr.ht/~sircmpwn/git.sr.ht/357
Create a new generate.go file which imports github.com/99designs/gqlgen.
This fixes this kind of error because go mod now knows about the
dependency:
/home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.13.0/cmd/gen.go:9:2: missing go.sum entry for module providing package github.com/urfave/cli/v2 (imported by github.com/99designs/gqlgen/cmd); to add:
go get github.com/99designs/gqlgen/cmd@v0.13.0
/home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.13.0/internal/imports/prune.go:15:2: missing go.sum entry for module providing package golang.org/x/tools/go/ast/astutil (imported by github.com/99designs/gqlgen/internal/imports); to add:
go get github.com/99designs/gqlgen/internal/imports@v0.13.0
/home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.13.0/internal/code/packages.go:8:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/99designs/gqlgen/internal/code); to add:
go get github.com/99designs/gqlgen/internal/code@v0.13.0
/home/simon/go/pkg/mod/github.com/99designs/gqlgen@v0.13.0/internal/imports/prune.go:16:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/99designs/gqlgen/internal/imports); to add:
go get github.com/99designs/gqlgen/internal/imports@v0.13.0
graph/resolver.go:7: running "go": exit status 1
missing go.sum entry for module providing package github.com/vektah/dataloaden; to add:
go mod download github.com/vektah/dataloaden
loaders/middleware.go:3: running "./gen": exit status 1
Useful to upload both the tarball and the PGP signature at once,
for instance.
For some reason getlist returns a non-empty list even if the user
selects no file. If the user selects one or multiple files, it
behaves as expected. That's why len(file_list) isn't used for
validation.
Now they're returned in SQL iteration order (by primary key?),
which sucks really bad if there's a few groups of similar artifacts
which get displayed in an effectively-random order
Replace explicit urls or email addresses by clickable links. Reuse the
existing regular expression in srht/markdown.py.
Detect references to valid commit ids and replace them by links to
git.sr.ht commits.
Signed-off-by: Robin Jarry <robin@jarry.cc>