From 84447df4d366324ab81894b028b00fd66be85caf Mon Sep 17 00:00:00 2001 From: Jason Song Date: Fri, 2 Sep 2022 15:58:49 +0800 Subject: [PATCH 01/22] Support Issue forms and PR forms (#20987) * feat: extend issue template for yaml * feat: support yaml template * feat: render form to markdown * feat: support yaml template for pr * chore: rename to Fields * feat: template unmarshal * feat: split template * feat: render to markdown * feat: use full name as template file name * chore: remove useless file * feat: use dropdown of fomantic ui * feat: update input style * docs: more comments * fix: render text without render * chore: fix lint error * fix: support use description as about in markdown * fix: add field class in form * chore: generate swagger * feat: validate template * feat: support is_nummber and regex * test: fix broken unit tests * fix: ignore empty body of md template * fix: make multiple easymde editors work in one page * feat: better UI * fix: js error in pr form * chore: generate swagger * feat: support regex validation * chore: generate swagger * fix: refresh each markdown editor * chore: give up required validation * fix: correct issue template candidates * fix: correct checkboxes style * chore: ignore .hugo_build.lock in docs * docs: separate out a new doc for merge templates * docs: introduce syntax of yaml template * feat: show a alert for invalid templates * test: add case for a valid template * fix: correct attributes of required checkbox * fix: add class not-under-easymde for dropzone * fix: use more back-quotes * chore: remove translation in zh-CN * fix EasyMDE statusbar margin * fix: remove repeated blocks * fix: reuse regex for quotes Co-authored-by: wxiaoguang --- docs/.gitignore | 3 + .../issue-pull-request-templates.en-us.md | 215 +++++- .../usage/merge-message-templates.en-us.md | 48 ++ modules/context/repo.go | 71 +- modules/issue/template/template.go | 392 +++++++++++ modules/issue/template/template_test.go | 645 ++++++++++++++++++ modules/issue/template/unmarshal.go | 125 ++++ modules/markup/markdown/meta_test.go | 15 +- modules/structs/issue.go | 60 +- options/locale/locale_en-US.ini | 2 + routers/web/repo/compare.go | 6 +- routers/web/repo/issue.go | 173 +++-- routers/web/repo/pull.go | 22 +- templates/base/alert.tmpl | 5 + templates/repo/diff/compare.tmpl | 8 + templates/repo/issue/choose.tmpl | 1 + templates/repo/issue/comment_tab.tmpl | 37 +- templates/repo/issue/fields/checkboxes.tmpl | 12 + templates/repo/issue/fields/dropdown.tmpl | 14 + templates/repo/issue/fields/header.tmpl | 6 + templates/repo/issue/fields/input.tmpl | 4 + templates/repo/issue/fields/markdown.tmpl | 3 + templates/repo/issue/fields/textarea.tmpl | 6 + templates/repo/issue/new.tmpl | 8 + templates/swagger/v1_json.tmpl | 36 + web_src/js/features/comp/EasyMDE.js | 2 +- web_src/js/features/repo-legacy.js | 19 +- web_src/less/_base.less | 3 +- web_src/less/codemirror/base.less | 4 + web_src/less/features/dropzone.less | 1 - 30 files changed, 1773 insertions(+), 173 deletions(-) create mode 100644 docs/content/doc/usage/merge-message-templates.en-us.md create mode 100644 modules/issue/template/template.go create mode 100644 modules/issue/template/template_test.go create mode 100644 modules/issue/template/unmarshal.go create mode 100644 templates/repo/issue/fields/checkboxes.tmpl create mode 100644 templates/repo/issue/fields/dropdown.tmpl create mode 100644 templates/repo/issue/fields/header.tmpl create mode 100644 templates/repo/issue/fields/input.tmpl create mode 100644 templates/repo/issue/fields/markdown.tmpl create mode 100644 templates/repo/issue/fields/textarea.tmpl diff --git a/docs/.gitignore b/docs/.gitignore index 9cd1408bd249..271adbb1da10 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -2,3 +2,6 @@ public/ templates/swagger/v1_json.tmpl themes/ resources/ + +# Temporary lock file while building +/.hugo_build.lock diff --git a/docs/content/doc/usage/issue-pull-request-templates.en-us.md b/docs/content/doc/usage/issue-pull-request-templates.en-us.md index 38cbfbf8a5a3..f1d577e77b83 100644 --- a/docs/content/doc/usage/issue-pull-request-templates.en-us.md +++ b/docs/content/doc/usage/issue-pull-request-templates.en-us.md @@ -25,51 +25,53 @@ main branch of the repository so that they can autopopulate the form when users creating issues and pull requests. This will cut down on the initial back and forth of getting some clarifying details. +Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&body=Issue+Text` and the form will be populated with those strings. Those strings will be used instead of the template if there is one. + +## File names + Possible file names for issue templates: - `ISSUE_TEMPLATE.md` +- `ISSUE_TEMPLATE.yaml` +- `ISSUE_TEMPLATE.yml` - `issue_template.md` +- `issue_template.yaml` +- `issue_template.yml` - `.gitea/ISSUE_TEMPLATE.md` +- `.gitea/ISSUE_TEMPLATE.yaml` +- `.gitea/ISSUE_TEMPLATE.yml` +- `.gitea/issue_template.md` +- `.gitea/issue_template.yaml` - `.gitea/issue_template.md` - `.github/ISSUE_TEMPLATE.md` +- `.github/ISSUE_TEMPLATE.yaml` +- `.github/ISSUE_TEMPLATE.yml` - `.github/issue_template.md` +- `.github/issue_template.yaml` +- `.github/issue_template.yml` Possible file names for PR templates: - `PULL_REQUEST_TEMPLATE.md` +- `PULL_REQUEST_TEMPLATE.yaml` +- `PULL_REQUEST_TEMPLATE.yml` - `pull_request_template.md` +- `pull_request_template.yaml` +- `pull_request_template.yml` - `.gitea/PULL_REQUEST_TEMPLATE.md` +- `.gitea/PULL_REQUEST_TEMPLATE.yaml` +- `.gitea/PULL_REQUEST_TEMPLATE.yml` - `.gitea/pull_request_template.md` +- `.gitea/pull_request_template.yaml` +- `.gitea/pull_request_template.yml` - `.github/PULL_REQUEST_TEMPLATE.md` +- `.github/PULL_REQUEST_TEMPLATE.yaml` +- `.github/PULL_REQUEST_TEMPLATE.yml` - `.github/pull_request_template.md` +- `.github/pull_request_template.yaml` +- `.github/pull_request_template.yml` -Possible file names for PR default merge message templates: - -- `.gitea/default_merge_message/MERGE_TEMPLATE.md` -- `.gitea/default_merge_message/REBASE_TEMPLATE.md` -- `.gitea/default_merge_message/REBASE-MERGE_TEMPLATE.md` -- `.gitea/default_merge_message/SQUASH_TEMPLATE.md` -- `.gitea/default_merge_message/MANUALLY-MERGED_TEMPLATE.md` -- `.gitea/default_merge_message/REBASE-UPDATE-ONLY_TEMPLATE.md` - -You can use the following variables enclosed in `${}` inside these templates which follow [os.Expand](https://pkg.go.dev/os#Expand) syntax: - -- BaseRepoOwnerName: Base repository owner name of this pull request -- BaseRepoName: Base repository name of this pull request -- BaseBranch: Base repository target branch name of this pull request -- HeadRepoOwnerName: Head repository owner name of this pull request -- HeadRepoName: Head repository name of this pull request -- HeadBranch: Head repository branch name of this pull request -- PullRequestTitle: Pull request's title -- PullRequestDescription: Pull request's description -- PullRequestPosterName: Pull request's poster name -- PullRequestIndex: Pull request's index number -- PullRequestReference: Pull request's reference char with index number. i.e. #1, !2 -- ClosingIssues: return a string contains all issues which will be closed by this pull request i.e. `close #1, close #2` - -Additionally, the New Issue page URL can be suffixed with `?title=Issue+Title&body=Issue+Text` and the form will be populated with those strings. Those strings will be used instead of the template if there is one. - -## Issue Template Directory +## Directory names Alternatively, users can create multiple issue templates inside a special directory and allow users to choose one that more specifically addresses their problem. @@ -85,7 +87,9 @@ Possible directory names for issue templates: - `.gitlab/ISSUE_TEMPLATE` - `.gitlab/issue_template` -Inside the directory can be multiple markdown (`.md`) issue templates of the form +Inside the directory can be multiple markdown (`.md`) or yaml (`.yaml`/`.yml`) issue templates of the form. + +## Syntax for markdown template ```md --- @@ -108,3 +112,158 @@ In the above example, when a user is presented with the list of issues they can `This template is for testing!`. When submitting an issue with the above example, the issue title would be pre-populated with `[TEST] ` while the issue body would be pre-populated with `This is the template!`. The issue would also be assigned two labels, `bug` and `help needed`, and the issue will have a reference to `main`. + +## Syntax for yaml template + +This example YAML configuration file defines an issue form using several inputs to report a bug. + +```yaml +name: Bug Report +about: File a bug report +title: "[Bug]: " +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: input + id: contact + attributes: + label: Contact Details + description: How can we get in touch with you if we need more info? + placeholder: ex. email@example.com + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: dropdown + id: version + attributes: + label: Version + description: What version of our software are you running? + options: + - 1.0.2 (Default) + - 1.0.3 (Edge) + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com) + options: + - label: I agree to follow this project's Code of Conduct + required: true +``` + +### Markdown + +You can use a `markdown` element to display Markdown in your form that provides extra context to the user, but is not submitted. + +Attributes: + +| Key | Description | Required | Type | Default | Valid values | +|-------|--------------------------------------------------------------|----------|--------|---------|--------------| +| value | The text that is rendered. Markdown formatting is supported. | Required | String | - | - | + +### Textarea + +You can use a `textarea` element to add a multi-line text field to your form. Contributors can also attach files in `textarea` fields. + +Attributes: + +| Key | Description | Required | Type | Default | Valid values | +|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|--------|--------------|---------------------------| +| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - | +| description | A description of the text area to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - | +| placeholder | A semi-opaque placeholder that renders in the text area when empty. | Optional | String | Empty String | - | +| value | Text that is pre-filled in the text area. | Optional | String | - | - | +| render | If a value is provided, submitted text will be formatted into a codeblock. When this key is provided, the text area will not expand for file attachments or Markdown editing. | Optional | String | - | Languages known to Gitea. | + +Validations: + +| Key | Description | Required | Type | Default | Valid values | +|----------|------------------------------------------------------|----------|---------|---------|--------------| +| required | Prevents form submission until element is completed. | Optional | Boolean | false | - | + +### Input + +You can use an `input` element to add a single-line text field to your form. + +Attributes: + +| Key | Description | Required | Type | Default | Valid values | +|-------------|--------------------------------------------------------------------------------------------|----------|--------|--------------|--------------| +| label | A brief description of the expected user input, which is also displayed in the form. | Required | String | - | - | +| description | A description of the field to provide context or guidance, which is displayed in the form. | Optional | String | Empty String | - | +| placeholder | A semi-transparent placeholder that renders in the field when empty. | Optional | String | Empty String | - | +| value | Text that is pre-filled in the field. | Optional | String | - | - | + +Validations: + +| Key | Description | Required | Type | Default | Valid values | +|-----------|--------------------------------------------------------------------------------------------------|----------|---------|---------|--------------------------------------------------------------------------| +| required | Prevents form submission until element is completed. | Optional | Boolean | false | - | +| is_number | Prevents form submission until element is filled with a number. | Optional | Boolean | false | - | +| regex | Prevents form submission until element is filled with a value that match the regular expression. | Optional | String | - | a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) | + +### Dropdown + +You can use a `dropdown` element to add a dropdown menu in your form. + +Attributes: + +| Key | Description | Required | Type | Default | Valid values | +|-------------|-----------------------------------------------------------------------------------------------------|----------|--------------|--------------|--------------| +| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - | +| description | A description of the dropdown to provide extra context or guidance, which is displayed in the form. | Optional | String | Empty String | - | +| multiple | Determines if the user can select more than one option. | Optional | Boolean | false | - | +| options | An array of options the user can choose from. Cannot be empty and all choices must be distinct. | Required | String array | - | - | + +Validations: + +| Key | Description | Required | Type | Default | Valid values | +|----------|------------------------------------------------------|----------|---------|---------|--------------| +| required | Prevents form submission until element is completed. | Optional | Boolean | false | - | + +### Checkboxes + +You can use the `checkboxes` element to add a set of checkboxes to your form. + +Attributes: + +| Key | Description | Required | Type | Default | Valid values | +|-------------|-------------------------------------------------------------------------------------------------------|----------|--------|--------------|--------------| +| label | A brief description of the expected user input, which is displayed in the form. | Required | String | - | - | +| description | A description of the set of checkboxes, which is displayed in the form. Supports Markdown formatting. | Optional | String | Empty String | - | +| options | An array of checkboxes that the user can select. For syntax, see below. | Required | Array | - | - | + +For each value in the options array, you can set the following keys. + +| Key | Description | Required | Type | Default | Options | +|----------|------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------|---------| +| label | The identifier for the option, which is displayed in the form. Markdown is supported for bold or italic text formatting, and hyperlinks. | Required | String | - | - | +| required | Prevents form submission until element is completed. | Optional | Boolean | false | - | diff --git a/docs/content/doc/usage/merge-message-templates.en-us.md b/docs/content/doc/usage/merge-message-templates.en-us.md new file mode 100644 index 000000000000..c30ac1bfeb40 --- /dev/null +++ b/docs/content/doc/usage/merge-message-templates.en-us.md @@ -0,0 +1,48 @@ +--- +date: "2022-08-31T17:35:40+08:00" +title: "Usage: Merge Message templates" +slug: "merge-message-templates" +weight: 15 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "Merge Message templates" + weight: 15 + identifier: "merge-message-templates" +--- + +# Merge Message templates + +**Table of Contents** + +{{< toc >}} + +## File names + +Possible file names for PR default merge message templates: + +- `.gitea/default_merge_message/MERGE_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE-MERGE_TEMPLATE.md` +- `.gitea/default_merge_message/SQUASH_TEMPLATE.md` +- `.gitea/default_merge_message/MANUALLY-MERGED_TEMPLATE.md` +- `.gitea/default_merge_message/REBASE-UPDATE-ONLY_TEMPLATE.md` + +## Variables + +You can use the following variables enclosed in `${}` inside these templates which follow [os.Expand](https://pkg.go.dev/os#Expand) syntax: + +- BaseRepoOwnerName: Base repository owner name of this pull request +- BaseRepoName: Base repository name of this pull request +- BaseBranch: Base repository target branch name of this pull request +- HeadRepoOwnerName: Head repository owner name of this pull request +- HeadRepoName: Head repository name of this pull request +- HeadBranch: Head repository branch name of this pull request +- PullRequestTitle: Pull request's title +- PullRequestDescription: Pull request's description +- PullRequestPosterName: Pull request's poster name +- PullRequestIndex: Pull request's index number +- PullRequestReference: Pull request's reference char with index number. i.e. #1, !2 +- ClosingIssues: return a string contains all issues which will be closed by this pull request i.e. `close #1, close #2` diff --git a/modules/context/repo.go b/modules/context/repo.go index 5404acc05a3a..6a336c45f752 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -9,7 +9,6 @@ import ( "context" "fmt" "html" - "io" "net/http" "net/url" "path" @@ -26,8 +25,8 @@ import ( "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/git" code_indexer "code.gitea.io/gitea/modules/indexer/code" + "code.gitea.io/gitea/modules/issue/template" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/markup/markdown" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -1034,70 +1033,52 @@ func UnitTypes() func(ctx *Context) { } } -// IssueTemplatesFromDefaultBranch checks for issue templates in the repo's default branch -func (ctx *Context) IssueTemplatesFromDefaultBranch() []api.IssueTemplate { - var issueTemplates []api.IssueTemplate +// IssueTemplatesFromDefaultBranch checks for valid issue templates in the repo's default branch, +func (ctx *Context) IssueTemplatesFromDefaultBranch() []*api.IssueTemplate { + ret, _ := ctx.IssueTemplatesErrorsFromDefaultBranch() + return ret +} + +// IssueTemplatesErrorsFromDefaultBranch checks for issue templates in the repo's default branch, +// returns valid templates and the errors of invalid template files. +func (ctx *Context) IssueTemplatesErrorsFromDefaultBranch() ([]*api.IssueTemplate, map[string]error) { + var issueTemplates []*api.IssueTemplate if ctx.Repo.Repository.IsEmpty { - return issueTemplates + return issueTemplates, nil } if ctx.Repo.Commit == nil { var err error ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) if err != nil { - return issueTemplates + return issueTemplates, nil } } + invalidFiles := map[string]error{} for _, dirName := range IssueTemplateDirCandidates { tree, err := ctx.Repo.Commit.SubTree(dirName) if err != nil { + log.Debug("get sub tree of %s: %v", dirName, err) continue } entries, err := tree.ListEntries() if err != nil { - return issueTemplates + log.Debug("list entries in %s: %v", dirName, err) + return issueTemplates, nil } for _, entry := range entries { - if strings.HasSuffix(entry.Name(), ".md") { - if entry.Blob().Size() >= setting.UI.MaxDisplayFileSize { - log.Debug("Issue template is too large: %s", entry.Name()) - continue - } - r, err := entry.Blob().DataAsync() - if err != nil { - log.Debug("DataAsync: %v", err) - continue - } - closed := false - defer func() { - if !closed { - _ = r.Close() - } - }() - data, err := io.ReadAll(r) - if err != nil { - log.Debug("ReadAll: %v", err) - continue - } - _ = r.Close() - var it api.IssueTemplate - content, err := markdown.ExtractMetadata(string(data), &it) - if err != nil { - log.Debug("ExtractMetadata: %v", err) - continue - } - it.Content = content - it.FileName = entry.Name() - if it.Valid() { - issueTemplates = append(issueTemplates, it) - } + if !template.CouldBe(entry.Name()) { + continue + } + fullName := path.Join(dirName, entry.Name()) + if it, err := template.UnmarshalFromEntry(entry, dirName); err != nil { + invalidFiles[fullName] = err + } else { + issueTemplates = append(issueTemplates, it) } - } - if len(issueTemplates) > 0 { - return issueTemplates } } - return issueTemplates + return issueTemplates, invalidFiles } diff --git a/modules/issue/template/template.go b/modules/issue/template/template.go new file mode 100644 index 000000000000..a4c0fb5aa644 --- /dev/null +++ b/modules/issue/template/template.go @@ -0,0 +1,392 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package template + +import ( + "fmt" + "net/url" + "regexp" + "strconv" + "strings" + + api "code.gitea.io/gitea/modules/structs" + + "gitea.com/go-chi/binding" +) + +// Validate checks whether an IssueTemplate is considered valid, and returns the first error +func Validate(template *api.IssueTemplate) error { + if err := validateMetadata(template); err != nil { + return err + } + if template.Type() == api.IssueTemplateTypeYaml { + if err := validateYaml(template); err != nil { + return err + } + } + return nil +} + +func validateMetadata(template *api.IssueTemplate) error { + if strings.TrimSpace(template.Name) == "" { + return fmt.Errorf("'name' is required") + } + if strings.TrimSpace(template.About) == "" { + return fmt.Errorf("'about' is required") + } + return nil +} + +func validateYaml(template *api.IssueTemplate) error { + if len(template.Fields) == 0 { + return fmt.Errorf("'body' is required") + } + ids := map[string]struct{}{} + for idx, field := range template.Fields { + if err := validateID(field, idx, ids); err != nil { + return err + } + if err := validateLabel(field, idx); err != nil { + return err + } + + position := newErrorPosition(idx, field.Type) + switch field.Type { + case api.IssueFormFieldTypeMarkdown: + if err := validateStringItem(position, field.Attributes, true, "value"); err != nil { + return err + } + case api.IssueFormFieldTypeTextarea: + if err := validateStringItem(position, field.Attributes, false, + "description", + "placeholder", + "value", + "render", + ); err != nil { + return err + } + case api.IssueFormFieldTypeInput: + if err := validateStringItem(position, field.Attributes, false, + "description", + "placeholder", + "value", + ); err != nil { + return err + } + if err := validateBoolItem(position, field.Validations, "is_number"); err != nil { + return err + } + if err := validateStringItem(position, field.Validations, false, "regex"); err != nil { + return err + } + case api.IssueFormFieldTypeDropdown: + if err := validateStringItem(position, field.Attributes, false, "description"); err != nil { + return err + } + if err := validateBoolItem(position, field.Attributes, "multiple"); err != nil { + return err + } + if err := validateOptions(field, idx); err != nil { + return err + } + case api.IssueFormFieldTypeCheckboxes: + if err := validateStringItem(position, field.Attributes, false, "description"); err != nil { + return err + } + if err := validateOptions(field, idx); err != nil { + return err + } + default: + return position.Errorf("unknown type") + } + + if err := validateRequired(field, idx); err != nil { + return err + } + } + return nil +} + +func validateLabel(field *api.IssueFormField, idx int) error { + if field.Type == api.IssueFormFieldTypeMarkdown { + // The label is not required for a markdown field + return nil + } + return validateStringItem(newErrorPosition(idx, field.Type), field.Attributes, true, "label") +} + +func validateRequired(field *api.IssueFormField, idx int) error { + if field.Type == api.IssueFormFieldTypeMarkdown || field.Type == api.IssueFormFieldTypeCheckboxes { + // The label is not required for a markdown or checkboxes field + return nil + } + return validateBoolItem(newErrorPosition(idx, field.Type), field.Validations, "required") +} + +func validateID(field *api.IssueFormField, idx int, ids map[string]struct{}) error { + if field.Type == api.IssueFormFieldTypeMarkdown { + // The ID is not required for a markdown field + return nil + } + + position := newErrorPosition(idx, field.Type) + if field.ID == "" { + // If the ID is empty in yaml, template.Unmarshal will auto autofill it, so it cannot be empty + return position.Errorf("'id' is required") + } + if binding.AlphaDashPattern.MatchString(field.ID) { + return position.Errorf("'id' should contain only alphanumeric, '-' and '_'") + } + if _, ok := ids[field.ID]; ok { + return position.Errorf("'id' should be unique") + } + ids[field.ID] = struct{}{} + return nil +} + +func validateOptions(field *api.IssueFormField, idx int) error { + if field.Type != api.IssueFormFieldTypeDropdown && field.Type != api.IssueFormFieldTypeCheckboxes { + return nil + } + position := newErrorPosition(idx, field.Type) + + options, ok := field.Attributes["options"].([]interface{}) + if !ok || len(options) == 0 { + return position.Errorf("'options' is required and should be a array") + } + + for optIdx, option := range options { + position := newErrorPosition(idx, field.Type, optIdx) + switch field.Type { + case api.IssueFormFieldTypeDropdown: + if _, ok := option.(string); !ok { + return position.Errorf("should be a string") + } + case api.IssueFormFieldTypeCheckboxes: + opt, ok := option.(map[interface{}]interface{}) + if !ok { + return position.Errorf("should be a dictionary") + } + if label, ok := opt["label"].(string); !ok || label == "" { + return position.Errorf("'label' is required and should be a string") + } + + if required, ok := opt["required"]; ok { + if _, ok := required.(bool); !ok { + return position.Errorf("'required' should be a bool") + } + } + } + } + return nil +} + +func validateStringItem(position errorPosition, m map[string]interface{}, required bool, names ...string) error { + for _, name := range names { + v, ok := m[name] + if !ok { + if required { + return position.Errorf("'%s' is required", name) + } + return nil + } + attr, ok := v.(string) + if !ok { + return position.Errorf("'%s' should be a string", name) + } + if strings.TrimSpace(attr) == "" && required { + return position.Errorf("'%s' is required", name) + } + } + return nil +} + +func validateBoolItem(position errorPosition, m map[string]interface{}, names ...string) error { + for _, name := range names { + v, ok := m[name] + if !ok { + return nil + } + if _, ok := v.(bool); !ok { + return position.Errorf("'%s' should be a bool", name) + } + } + return nil +} + +type errorPosition string + +func (p errorPosition) Errorf(format string, a ...interface{}) error { + return fmt.Errorf(string(p)+": "+format, a...) +} + +func newErrorPosition(fieldIdx int, fieldType api.IssueFormFieldType, optionIndex ...int) errorPosition { + ret := fmt.Sprintf("body[%d](%s)", fieldIdx, fieldType) + if len(optionIndex) > 0 { + ret += fmt.Sprintf(", option[%d]", optionIndex[0]) + } + return errorPosition(ret) +} + +// RenderToMarkdown renders template to markdown with specified values +func RenderToMarkdown(template *api.IssueTemplate, values url.Values) string { + builder := &strings.Builder{} + + for _, field := range template.Fields { + f := &valuedField{ + IssueFormField: field, + Values: values, + } + if f.ID == "" { + continue + } + f.WriteTo(builder) + } + + return builder.String() +} + +type valuedField struct { + *api.IssueFormField + url.Values +} + +func (f *valuedField) WriteTo(builder *strings.Builder) { + if f.Type == api.IssueFormFieldTypeMarkdown { + // markdown blocks do not appear in output + return + } + + // write label + _, _ = fmt.Fprintf(builder, "### %s\n\n", f.Label()) + + blankPlaceholder := "_No response_\n" + + // write body + switch f.Type { + case api.IssueFormFieldTypeCheckboxes: + for _, option := range f.Options() { + checked := " " + if option.IsChecked() { + checked = "x" + } + _, _ = fmt.Fprintf(builder, "- [%s] %s\n", checked, option.Label()) + } + case api.IssueFormFieldTypeDropdown: + var checkeds []string + for _, option := range f.Options() { + if option.IsChecked() { + checkeds = append(checkeds, option.Label()) + } + } + if len(checkeds) > 0 { + _, _ = fmt.Fprintf(builder, "%s\n", strings.Join(checkeds, ", ")) + } else { + _, _ = fmt.Fprint(builder, blankPlaceholder) + } + case api.IssueFormFieldTypeInput: + if value := f.Value(); value == "" { + _, _ = fmt.Fprint(builder, blankPlaceholder) + } else { + _, _ = fmt.Fprintf(builder, "%s\n", value) + } + case api.IssueFormFieldTypeTextarea: + if value := f.Value(); value == "" { + _, _ = fmt.Fprint(builder, blankPlaceholder) + } else if render := f.Render(); render != "" { + quotes := minQuotes(value) + _, _ = fmt.Fprintf(builder, "%s%s\n%s\n%s\n", quotes, f.Render(), value, quotes) + } else { + _, _ = fmt.Fprintf(builder, "%s\n", value) + } + } + _, _ = fmt.Fprintln(builder) +} + +func (f *valuedField) Label() string { + if label, ok := f.Attributes["label"].(string); ok { + return label + } + return "" +} + +func (f *valuedField) Render() string { + if render, ok := f.Attributes["render"].(string); ok { + return render + } + return "" +} + +func (f *valuedField) Value() string { + return strings.TrimSpace(f.Get(fmt.Sprintf("form-field-" + f.ID))) +} + +func (f *valuedField) Options() []*valuedOption { + if options, ok := f.Attributes["options"].([]interface{}); ok { + ret := make([]*valuedOption, 0, len(options)) + for i, option := range options { + ret = append(ret, &valuedOption{ + index: i, + data: option, + field: f, + }) + } + return ret + } + return nil +} + +type valuedOption struct { + index int + data interface{} + field *valuedField +} + +func (o *valuedOption) Label() string { + switch o.field.Type { + case api.IssueFormFieldTypeDropdown: + if label, ok := o.data.(string); ok { + return label + } + case api.IssueFormFieldTypeCheckboxes: + if vs, ok := o.data.(map[interface{}]interface{}); ok { + if v, ok := vs["label"].(string); ok { + return v + } + } + } + return "" +} + +func (o *valuedOption) IsChecked() bool { + switch o.field.Type { + case api.IssueFormFieldTypeDropdown: + checks := strings.Split(o.field.Get(fmt.Sprintf("form-field-%s", o.field.ID)), ",") + idx := strconv.Itoa(o.index) + for _, v := range checks { + if v == idx { + return true + } + } + return false + case api.IssueFormFieldTypeCheckboxes: + return o.field.Get(fmt.Sprintf("form-field-%s-%d", o.field.ID, o.index)) == "on" + } + return false +} + +var minQuotesRegex = regexp.MustCompilePOSIX("^`{3,}") + +// minQuotes return 3 or more back-quotes. +// If n back-quotes exists, use n+1 back-quotes to quote. +func minQuotes(value string) string { + ret := "```" + for _, v := range minQuotesRegex.FindAllString(value, -1) { + if len(v) >= len(ret) { + ret = v + "`" + } + } + return ret +} diff --git a/modules/issue/template/template_test.go b/modules/issue/template/template_test.go new file mode 100644 index 000000000000..883e1e078051 --- /dev/null +++ b/modules/issue/template/template_test.go @@ -0,0 +1,645 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package template + +import ( + "net/url" + "reflect" + "testing" + + "code.gitea.io/gitea/modules/json" + api "code.gitea.io/gitea/modules/structs" +) + +func TestValidate(t *testing.T) { + tests := []struct { + name string + content string + wantErr string + }{ + { + name: "miss name", + content: ``, + wantErr: "'name' is required", + }, + { + name: "miss about", + content: ` +name: "test" +`, + wantErr: "'about' is required", + }, + { + name: "miss body", + content: ` +name: "test" +about: "this is about" +`, + wantErr: "'body' is required", + }, + { + name: "markdown miss value", + content: ` +name: "test" +about: "this is about" +body: + - type: "markdown" +`, + wantErr: "body[0](markdown): 'value' is required", + }, + { + name: "markdown invalid value", + content: ` +name: "test" +about: "this is about" +body: + - type: "markdown" + attributes: + value: true +`, + wantErr: "body[0](markdown): 'value' should be a string", + }, + { + name: "markdown empty value", + content: ` +name: "test" +about: "this is about" +body: + - type: "markdown" + attributes: + value: "" +`, + wantErr: "body[0](markdown): 'value' is required", + }, + { + name: "textarea invalid id", + content: ` +name: "test" +about: "this is about" +body: + - type: "textarea" + id: "?" +`, + wantErr: "body[0](textarea): 'id' should contain only alphanumeric, '-' and '_'", + }, + { + name: "textarea miss label", + content: ` +name: "test" +about: "this is about" +body: + - type: "textarea" + id: "1" +`, + wantErr: "body[0](textarea): 'label' is required", + }, + { + name: "textarea conflict id", + content: ` +name: "test" +about: "this is about" +body: + - type: "textarea" + id: "1" + attributes: + label: "a" + - type: "textarea" + id: "1" + attributes: + label: "b" +`, + wantErr: "body[1](textarea): 'id' should be unique", + }, + { + name: "textarea invalid description", + content: ` +name: "test" +about: "this is about" +body: + - type: "textarea" + id: "1" + attributes: + label: "a" + description: true +`, + wantErr: "body[0](textarea): 'description' should be a string", + }, + { + name: "textarea invalid required", + content: ` +name: "test" +about: "this is about" +body: + - type: "textarea" + id: "1" + attributes: + label: "a" + validations: + required: "on" +`, + wantErr: "body[0](textarea): 'required' should be a bool", + }, + { + name: "input invalid description", + content: ` +name: "test" +about: "this is about" +body: + - type: "input" + id: "1" + attributes: + label: "a" + description: true +`, + wantErr: "body[0](input): 'description' should be a string", + }, + { + name: "input invalid is_number", + content: ` +name: "test" +about: "this is about" +body: + - type: "input" + id: "1" + attributes: + label: "a" + validations: + is_number: "yes" +`, + wantErr: "body[0](input): 'is_number' should be a bool", + }, + { + name: "input invalid regex", + content: ` +name: "test" +about: "this is about" +body: + - type: "input" + id: "1" + attributes: + label: "a" + validations: + regex: true +`, + wantErr: "body[0](input): 'regex' should be a string", + }, + { + name: "dropdown invalid description", + content: ` +name: "test" +about: "this is about" +body: + - type: "dropdown" + id: "1" + attributes: + label: "a" + description: true +`, + wantErr: "body[0](dropdown): 'description' should be a string", + }, + { + name: "dropdown invalid multiple", + content: ` +name: "test" +about: "this is about" +body: + - type: "dropdown" + id: "1" + attributes: + label: "a" + multiple: "on" +`, + wantErr: "body[0](dropdown): 'multiple' should be a bool", + }, + { + name: "checkboxes invalid description", + content: ` +name: "test" +about: "this is about" +body: + - type: "checkboxes" + id: "1" + attributes: + label: "a" + description: true +`, + wantErr: "body[0](checkboxes): 'description' should be a string", + }, + { + name: "invalid type", + content: ` +name: "test" +about: "this is about" +body: + - type: "video" + id: "1" + attributes: + label: "a" +`, + wantErr: "body[0](video): unknown type", + }, + { + name: "dropdown miss options", + content: ` +name: "test" +about: "this is about" +body: + - type: "dropdown" + id: "1" + attributes: + label: "a" +`, + wantErr: "body[0](dropdown): 'options' is required and should be a array", + }, + { + name: "dropdown invalid options", + content: ` +name: "test" +about: "this is about" +body: + - type: "dropdown" + id: "1" + attributes: + label: "a" + options: + - "a" + - true +`, + wantErr: "body[0](dropdown), option[1]: should be a string", + }, + { + name: "checkboxes invalid options", + content: ` +name: "test" +about: "this is about" +body: + - type: "checkboxes" + id: "1" + attributes: + label: "a" + options: + - "a" + - true +`, + wantErr: "body[0](checkboxes), option[0]: should be a dictionary", + }, + { + name: "checkboxes option miss label", + content: ` +name: "test" +about: "this is about" +body: + - type: "checkboxes" + id: "1" + attributes: + label: "a" + options: + - required: true +`, + wantErr: "body[0](checkboxes), option[0]: 'label' is required and should be a string", + }, + { + name: "checkboxes option invalid required", + content: ` +name: "test" +about: "this is about" +body: + - type: "checkboxes" + id: "1" + attributes: + label: "a" + options: + - label: "a" + required: "on" +`, + wantErr: "body[0](checkboxes), option[0]: 'required' should be a bool", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tmpl, err := unmarshal("test.yaml", []byte(tt.content)) + if err != nil { + t.Fatal(err) + } + if err := Validate(tmpl); (err == nil) != (tt.wantErr == "") || err != nil && err.Error() != tt.wantErr { + t.Errorf("Validate() error = %v, wantErr %q", err, tt.wantErr) + } + }) + } + + t.Run("valid", func(t *testing.T) { + content := ` +name: Name +title: Title +about: About +labels: ["label1", "label2"] +ref: Ref +body: + - type: markdown + id: id1 + attributes: + value: Value of the markdown + - type: textarea + id: id2 + attributes: + label: Label of textarea + description: Description of textarea + placeholder: Placeholder of textarea + value: Value of textarea + render: bash + validations: + required: true + - type: input + id: id3 + attributes: + label: Label of input + description: Description of input + placeholder: Placeholder of input + value: Value of input + validations: + required: true + is_number: true + regex: "[a-zA-Z0-9]+" + - type: dropdown + id: id4 + attributes: + label: Label of dropdown + description: Description of dropdown + multiple: true + options: + - Option 1 of dropdown + - Option 2 of dropdown + - Option 3 of dropdown + validations: + required: true + - type: checkboxes + id: id5 + attributes: + label: Label of checkboxes + description: Description of checkboxes + options: + - label: Option 1 of checkboxes + required: true + - label: Option 2 of checkboxes + required: false + - label: Option 3 of checkboxes + required: true +` + want := &api.IssueTemplate{ + Name: "Name", + Title: "Title", + About: "About", + Labels: []string{"label1", "label2"}, + Ref: "Ref", + Fields: []*api.IssueFormField{ + { + Type: "markdown", + ID: "id1", + Attributes: map[string]interface{}{ + "value": "Value of the markdown", + }, + }, + { + Type: "textarea", + ID: "id2", + Attributes: map[string]interface{}{ + "label": "Label of textarea", + "description": "Description of textarea", + "placeholder": "Placeholder of textarea", + "value": "Value of textarea", + "render": "bash", + }, + Validations: map[string]interface{}{ + "required": true, + }, + }, + { + Type: "input", + ID: "id3", + Attributes: map[string]interface{}{ + "label": "Label of input", + "description": "Description of input", + "placeholder": "Placeholder of input", + "value": "Value of input", + }, + Validations: map[string]interface{}{ + "required": true, + "is_number": true, + "regex": "[a-zA-Z0-9]+", + }, + }, + { + Type: "dropdown", + ID: "id4", + Attributes: map[string]interface{}{ + "label": "Label of dropdown", + "description": "Description of dropdown", + "multiple": true, + "options": []interface{}{ + "Option 1 of dropdown", + "Option 2 of dropdown", + "Option 3 of dropdown", + }, + }, + Validations: map[string]interface{}{ + "required": true, + }, + }, + { + Type: "checkboxes", + ID: "id5", + Attributes: map[string]interface{}{ + "label": "Label of checkboxes", + "description": "Description of checkboxes", + "options": []interface{}{ + map[interface{}]interface{}{"label": "Option 1 of checkboxes", "required": true}, + map[interface{}]interface{}{"label": "Option 2 of checkboxes", "required": false}, + map[interface{}]interface{}{"label": "Option 3 of checkboxes", "required": true}, + }, + }, + }, + }, + FileName: "test.yaml", + } + got, err := unmarshal("test.yaml", []byte(content)) + if err != nil { + t.Fatal(err) + } + if err := Validate(got); err != nil { + t.Errorf("Validate() error = %v", err) + } + if !reflect.DeepEqual(want, got) { + jsonWant, _ := json.Marshal(want) + jsonGot, _ := json.Marshal(got) + t.Errorf("want:\n%s\ngot:\n%s", jsonWant, jsonGot) + } + }) +} + +func TestRenderToMarkdown(t *testing.T) { + type args struct { + template string + values url.Values + } + tests := []struct { + name string + args args + want string + }{ + { + name: "normal", + args: args{ + template: ` +name: Name +title: Title +about: About +labels: ["label1", "label2"] +ref: Ref +body: + - type: markdown + id: id1 + attributes: + value: Value of the markdown + - type: textarea + id: id2 + attributes: + label: Label of textarea + description: Description of textarea + placeholder: Placeholder of textarea + value: Value of textarea + render: bash + validations: + required: true + - type: input + id: id3 + attributes: + label: Label of input + description: Description of input + placeholder: Placeholder of input + value: Value of input + validations: + required: true + is_number: true + regex: "[a-zA-Z0-9]+" + - type: dropdown + id: id4 + attributes: + label: Label of dropdown + description: Description of dropdown + multiple: true + options: + - Option 1 of dropdown + - Option 2 of dropdown + - Option 3 of dropdown + validations: + required: true + - type: checkboxes + id: id5 + attributes: + label: Label of checkboxes + description: Description of checkboxes + options: + - label: Option 1 of checkboxes + required: true + - label: Option 2 of checkboxes + required: false + - label: Option 3 of checkboxes + required: true +`, + values: map[string][]string{ + "form-field-id2": {"Value of id2"}, + "form-field-id3": {"Value of id3"}, + "form-field-id4": {"0,1"}, + "form-field-id5-0": {"on"}, + "form-field-id5-2": {"on"}, + }, + }, + want: `### Label of textarea + +` + "```bash\nValue of id2\n```" + ` + +### Label of input + +Value of id3 + +### Label of dropdown + +Option 1 of dropdown, Option 2 of dropdown + +### Label of checkboxes + +- [x] Option 1 of checkboxes +- [ ] Option 2 of checkboxes +- [x] Option 3 of checkboxes + +`, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + template, err := Unmarshal("test.yaml", []byte(tt.args.template)) + if err != nil { + t.Fatal(err) + } + if got := RenderToMarkdown(template, tt.args.values); got != tt.want { + t.Errorf("RenderToMarkdown() = %v, want %v", got, tt.want) + } + }) + } +} + +func Test_minQuotes(t *testing.T) { + type args struct { + value string + } + tests := []struct { + name string + args args + want string + }{ + { + name: "without quote", + args: args{ + value: "Hello\nWorld", + }, + want: "```", + }, + { + name: "with 1 quote", + args: args{ + value: "Hello\nWorld\n`text`\n", + }, + want: "```", + }, + { + name: "with 3 quotes", + args: args{ + value: "Hello\nWorld\n`text`\n```go\ntext\n```\n", + }, + want: "````", + }, + { + name: "with more quotes", + args: args{ + value: "Hello\nWorld\n`text`\n```go\ntext\n```\n``````````bash\ntext\n``````````\n", + }, + want: "```````````", + }, + { + name: "not leading quotes", + args: args{ + value: "Hello\nWorld`text````go\ntext`````````````bash\ntext``````````\n", + }, + want: "```", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := minQuotes(tt.args.value); got != tt.want { + t.Errorf("minQuotes() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/modules/issue/template/unmarshal.go b/modules/issue/template/unmarshal.go new file mode 100644 index 000000000000..e695d1e1cc66 --- /dev/null +++ b/modules/issue/template/unmarshal.go @@ -0,0 +1,125 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package template + +import ( + "fmt" + "io" + "path/filepath" + "strconv" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" + + "gopkg.in/yaml.v2" +) + +// CouldBe indicates a file with the filename could be a template, +// it is a low cost check before further processing. +func CouldBe(filename string) bool { + it := &api.IssueTemplate{ + FileName: filename, + } + return it.Type() != "" +} + +// Unmarshal parses out a valid template from the content +func Unmarshal(filename string, content []byte) (*api.IssueTemplate, error) { + it, err := unmarshal(filename, content) + if err != nil { + return nil, err + } + + if err := Validate(it); err != nil { + return nil, err + } + + return it, nil +} + +// UnmarshalFromEntry parses out a valid template from the blob in entry +func UnmarshalFromEntry(entry *git.TreeEntry, dir string) (*api.IssueTemplate, error) { + return unmarshalFromEntry(entry, filepath.Join(dir, entry.Name())) +} + +// UnmarshalFromCommit parses out a valid template from the commit +func UnmarshalFromCommit(commit *git.Commit, filename string) (*api.IssueTemplate, error) { + entry, err := commit.GetTreeEntryByPath(filename) + if err != nil { + return nil, fmt.Errorf("get entry for %q: %w", filename, err) + } + return unmarshalFromEntry(entry, filename) +} + +// UnmarshalFromRepo parses out a valid template from the head commit of the branch +func UnmarshalFromRepo(repo *git.Repository, branch, filename string) (*api.IssueTemplate, error) { + commit, err := repo.GetBranchCommit(branch) + if err != nil { + return nil, fmt.Errorf("get commit on branch %q: %w", branch, err) + } + + return UnmarshalFromCommit(commit, filename) +} + +func unmarshalFromEntry(entry *git.TreeEntry, filename string) (*api.IssueTemplate, error) { + if size := entry.Blob().Size(); size > setting.UI.MaxDisplayFileSize { + return nil, fmt.Errorf("too large: %v > MaxDisplayFileSize", size) + } + + r, err := entry.Blob().DataAsync() + if err != nil { + return nil, fmt.Errorf("data async: %w", err) + } + defer r.Close() + + content, err := io.ReadAll(r) + if err != nil { + return nil, fmt.Errorf("read all: %w", err) + } + + return Unmarshal(filename, content) +} + +func unmarshal(filename string, content []byte) (*api.IssueTemplate, error) { + it := &api.IssueTemplate{ + FileName: filename, + } + + // Compatible with treating description as about + compatibleTemplate := &struct { + About string `yaml:"description"` + }{} + + if typ := it.Type(); typ == api.IssueTemplateTypeMarkdown { + templateBody, err := markdown.ExtractMetadata(string(content), it) + if err != nil { + return nil, err + } + it.Content = templateBody + if it.About == "" { + if _, err := markdown.ExtractMetadata(string(content), compatibleTemplate); err == nil && compatibleTemplate.About != "" { + it.About = compatibleTemplate.About + } + } + } else if typ == api.IssueTemplateTypeYaml { + if err := yaml.Unmarshal(content, it); err != nil { + return nil, fmt.Errorf("yaml unmarshal: %w", err) + } + if it.About == "" { + if err := yaml.Unmarshal(content, compatibleTemplate); err == nil && compatibleTemplate.About != "" { + it.About = compatibleTemplate.About + } + } + for i, v := range it.Fields { + if v.ID == "" { + v.ID = strconv.Itoa(i) + } + } + } + + return it, nil +} diff --git a/modules/markup/markdown/meta_test.go b/modules/markup/markdown/meta_test.go index f525777a54c1..939646f8fd87 100644 --- a/modules/markup/markdown/meta_test.go +++ b/modules/markup/markdown/meta_test.go @@ -6,6 +6,7 @@ package markdown import ( "fmt" + "strings" "testing" "code.gitea.io/gitea/modules/structs" @@ -13,6 +14,16 @@ import ( "github.com/stretchr/testify/assert" ) +func validateMetadata(it structs.IssueTemplate) bool { + /* + A legacy to keep the unit tests working. + Copied from the method "func (it IssueTemplate) Valid() bool", the original method has been removed. + Because it becomes quite complicated to validate an issue template which is support yaml form now. + The new way to validate an issue template is to call the Validate in modules/issue/template, + */ + return strings.TrimSpace(it.Name) != "" && strings.TrimSpace(it.About) != "" +} + func TestExtractMetadata(t *testing.T) { t.Run("ValidFrontAndBody", func(t *testing.T) { var meta structs.IssueTemplate @@ -20,7 +31,7 @@ func TestExtractMetadata(t *testing.T) { assert.NoError(t, err) assert.Equal(t, bodyTest, body) assert.Equal(t, metaTest, meta) - assert.True(t, meta.Valid()) + assert.True(t, validateMetadata(meta)) }) t.Run("NoFirstSeparator", func(t *testing.T) { @@ -41,7 +52,7 @@ func TestExtractMetadata(t *testing.T) { assert.NoError(t, err) assert.Equal(t, "", body) assert.Equal(t, metaTest, meta) - assert.True(t, meta.Valid()) + assert.True(t, validateMetadata(meta)) }) } diff --git a/modules/structs/issue.go b/modules/structs/issue.go index c72487fe4dca..27ec81f7283f 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -5,7 +5,7 @@ package structs import ( - "strings" + "path/filepath" "time" ) @@ -120,19 +120,57 @@ type IssueDeadline struct { Deadline *time.Time `json:"due_date"` } +// IssueFormFieldType defines issue form field type, can be "markdown", "textarea", "input", "dropdown" or "checkboxes" +type IssueFormFieldType string + +const ( + IssueFormFieldTypeMarkdown IssueFormFieldType = "markdown" + IssueFormFieldTypeTextarea IssueFormFieldType = "textarea" + IssueFormFieldTypeInput IssueFormFieldType = "input" + IssueFormFieldTypeDropdown IssueFormFieldType = "dropdown" + IssueFormFieldTypeCheckboxes IssueFormFieldType = "checkboxes" +) + +// IssueFormField represents a form field +// swagger:model +type IssueFormField struct { + Type IssueFormFieldType `json:"type" yaml:"type"` + ID string `json:"id" yaml:"id"` + Attributes map[string]interface{} `json:"attributes" yaml:"attributes"` + Validations map[string]interface{} `json:"validations" yaml:"validations"` +} + // IssueTemplate represents an issue template for a repository // swagger:model type IssueTemplate struct { - Name string `json:"name" yaml:"name"` - Title string `json:"title" yaml:"title"` - About string `json:"about" yaml:"about"` - Labels []string `json:"labels" yaml:"labels"` - Ref string `json:"ref" yaml:"ref"` - Content string `json:"content" yaml:"-"` - FileName string `json:"file_name" yaml:"-"` + Name string `json:"name" yaml:"name"` + Title string `json:"title" yaml:"title"` + About string `json:"about" yaml:"about"` // Using "description" in a template file is compatible + Labels []string `json:"labels" yaml:"labels"` + Ref string `json:"ref" yaml:"ref"` + Content string `json:"content" yaml:"-"` + Fields []*IssueFormField `json:"body" yaml:"body"` + FileName string `json:"file_name" yaml:"-"` } -// Valid checks whether an IssueTemplate is considered valid, e.g. at least name and about -func (it IssueTemplate) Valid() bool { - return strings.TrimSpace(it.Name) != "" && strings.TrimSpace(it.About) != "" +// IssueTemplateType defines issue template type +type IssueTemplateType string + +const ( + IssueTemplateTypeMarkdown IssueTemplateType = "md" + IssueTemplateTypeYaml IssueTemplateType = "yaml" +) + +// Type returns the type of IssueTemplate, can be "md", "yaml" or empty for known +func (it IssueTemplate) Type() IssueTemplateType { + if it.Name == "config.yaml" || it.Name == "config.yml" { + // ignore config.yaml which is a special configuration file + return "" + } + if ext := filepath.Ext(it.FileName); ext == ".md" { + return IssueTemplateTypeMarkdown + } else if ext == ".yaml" || ext == ".yml" { + return "yaml" + } + return IssueTemplateTypeYaml } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index f900e90e7f85..ba647771e30f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1231,6 +1231,8 @@ issues.new.add_reviewer_title = Request review issues.choose.get_started = Get Started issues.choose.blank = Default issues.choose.blank_about = Create an issue from default template. +issues.choose.ignore_invalid_templates = Invalid templates have been ignored +issues.choose.invalid_templates = %v invalid template(s) found issues.no_ref = No Branch/Tag Specified issues.create = Create Issue issues.new_label = New Label diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index f34d3a520343..e35af31724fd 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -784,7 +784,11 @@ func CompareDiff(ctx *context.Context) { ctx.Data["IsRepoToolbarCommits"] = true ctx.Data["IsDiffCompare"] = true ctx.Data["RequireTribute"] = true - setTemplateIfExists(ctx, pullRequestTemplateKey, nil, pullRequestTemplateCandidates) + templateErrs := setTemplateIfExists(ctx, pullRequestTemplateKey, pullRequestTemplateCandidates) + + if len(templateErrs) > 0 { + ctx.Flash.Warning(renderErrorOfTemplates(ctx, templateErrs), true) + } // If a template content is set, prepend the "content". In this case that's only // applicable if you have one commit to compare and that commit has a message. diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 3f14416e4837..06e003bff282 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -10,11 +10,10 @@ import ( stdCtx "context" "errors" "fmt" - "io" "math/big" "net/http" "net/url" - "path" + "sort" "strconv" "strings" "time" @@ -35,6 +34,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" issue_indexer "code.gitea.io/gitea/modules/indexer/issues" + issue_template "code.gitea.io/gitea/modules/issue/template" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" @@ -45,6 +45,7 @@ import ( "code.gitea.io/gitea/modules/upload" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/utils" asymkey_service "code.gitea.io/gitea/services/asymkey" comment_service "code.gitea.io/gitea/services/comments" "code.gitea.io/gitea/services/forms" @@ -70,11 +71,23 @@ const ( // IssueTemplateCandidates issue templates var IssueTemplateCandidates = []string{ "ISSUE_TEMPLATE.md", + "ISSUE_TEMPLATE.yaml", + "ISSUE_TEMPLATE.yml", "issue_template.md", + "issue_template.yaml", + "issue_template.yml", ".gitea/ISSUE_TEMPLATE.md", + ".gitea/ISSUE_TEMPLATE.yaml", + ".gitea/ISSUE_TEMPLATE.yml", + ".gitea/issue_template.md", + ".gitea/issue_template.yaml", ".gitea/issue_template.md", ".github/ISSUE_TEMPLATE.md", + ".github/ISSUE_TEMPLATE.yaml", + ".github/ISSUE_TEMPLATE.yml", ".github/issue_template.md", + ".github/issue_template.yaml", + ".github/issue_template.yml", } // MustAllowUserComment checks to make sure if an issue is locked. @@ -722,81 +735,62 @@ func RetrieveRepoMetas(ctx *context.Context, repo *repo_model.Repository, isPull return labels } -func getFileContentFromDefaultBranch(ctx *context.Context, filename string) (string, bool) { - if ctx.Repo.Commit == nil { - var err error - ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) - if err != nil { - return "", false - } - } - - entry, err := ctx.Repo.Commit.GetTreeEntryByPath(filename) - if err != nil { - return "", false - } - if entry.Blob().Size() >= setting.UI.MaxDisplayFileSize { - return "", false - } - r, err := entry.Blob().DataAsync() - if err != nil { - return "", false - } - defer r.Close() - bytes, err := io.ReadAll(r) +func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleFiles []string) map[string]error { + commit, err := ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) if err != nil { - return "", false + return nil } - return string(bytes), true -} -func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleDirs, possibleFiles []string) { - templateCandidates := make([]string, 0, len(possibleFiles)) - if ctx.FormString("template") != "" { - for _, dirName := range possibleDirs { - templateCandidates = append(templateCandidates, path.Join(dirName, ctx.FormString("template"))) - } + templateCandidates := make([]string, 0, 1+len(possibleFiles)) + if t := ctx.FormString("template"); t != "" { + templateCandidates = append(templateCandidates, t) } templateCandidates = append(templateCandidates, possibleFiles...) // Append files to the end because they should be fallback + + templateErrs := map[string]error{} for _, filename := range templateCandidates { - templateContent, found := getFileContentFromDefaultBranch(ctx, filename) - if found { - var meta api.IssueTemplate - templateBody, err := markdown.ExtractMetadata(templateContent, &meta) - if err != nil { - log.Debug("could not extract metadata from %s [%s]: %v", filename, ctx.Repo.Repository.FullName(), err) - ctx.Data[ctxDataKey] = templateContent - return - } - ctx.Data[issueTemplateTitleKey] = meta.Title - ctx.Data[ctxDataKey] = templateBody - labelIDs := make([]string, 0, len(meta.Labels)) - if repoLabels, err := issues_model.GetLabelsByRepoID(ctx, ctx.Repo.Repository.ID, "", db.ListOptions{}); err == nil { - ctx.Data["Labels"] = repoLabels - if ctx.Repo.Owner.IsOrganization() { - if orgLabels, err := issues_model.GetLabelsByOrgID(ctx, ctx.Repo.Owner.ID, ctx.FormString("sort"), db.ListOptions{}); err == nil { - ctx.Data["OrgLabels"] = orgLabels - repoLabels = append(repoLabels, orgLabels...) - } + if ok, _ := commit.HasFile(filename); !ok { + continue + } + template, err := issue_template.UnmarshalFromCommit(commit, filename) + if err != nil { + templateErrs[filename] = err + continue + } + ctx.Data[issueTemplateTitleKey] = template.Title + ctx.Data[ctxDataKey] = template.Content + + if template.Type() == api.IssueTemplateTypeYaml { + ctx.Data["Fields"] = template.Fields + ctx.Data["TemplateFile"] = template.FileName + } + labelIDs := make([]string, 0, len(template.Labels)) + if repoLabels, err := issues_model.GetLabelsByRepoID(ctx, ctx.Repo.Repository.ID, "", db.ListOptions{}); err == nil { + ctx.Data["Labels"] = repoLabels + if ctx.Repo.Owner.IsOrganization() { + if orgLabels, err := issues_model.GetLabelsByOrgID(ctx, ctx.Repo.Owner.ID, ctx.FormString("sort"), db.ListOptions{}); err == nil { + ctx.Data["OrgLabels"] = orgLabels + repoLabels = append(repoLabels, orgLabels...) } + } - for _, metaLabel := range meta.Labels { - for _, repoLabel := range repoLabels { - if strings.EqualFold(repoLabel.Name, metaLabel) { - repoLabel.IsChecked = true - labelIDs = append(labelIDs, strconv.FormatInt(repoLabel.ID, 10)) - break - } + for _, metaLabel := range template.Labels { + for _, repoLabel := range repoLabels { + if strings.EqualFold(repoLabel.Name, metaLabel) { + repoLabel.IsChecked = true + labelIDs = append(labelIDs, strconv.FormatInt(repoLabel.ID, 10)) + break } } } - ctx.Data["HasSelectedLabel"] = len(labelIDs) > 0 - ctx.Data["label_ids"] = strings.Join(labelIDs, ",") - ctx.Data["Reference"] = meta.Ref - ctx.Data["RefEndName"] = git.RefEndName(meta.Ref) - return } + ctx.Data["HasSelectedLabel"] = len(labelIDs) > 0 + ctx.Data["label_ids"] = strings.Join(labelIDs, ",") + ctx.Data["Reference"] = template.Ref + ctx.Data["RefEndName"] = git.RefEndName(template.Ref) + return templateErrs } + return templateErrs } // NewIssue render creating issue page @@ -845,24 +839,62 @@ func NewIssue(ctx *context.Context) { } RetrieveRepoMetas(ctx, ctx.Repo.Repository, false) - setTemplateIfExists(ctx, issueTemplateKey, context.IssueTemplateDirCandidates, IssueTemplateCandidates) + + _, templateErrs := ctx.IssueTemplatesErrorsFromDefaultBranch() + if errs := setTemplateIfExists(ctx, issueTemplateKey, IssueTemplateCandidates); len(errs) > 0 { + for k, v := range errs { + templateErrs[k] = v + } + } if ctx.Written() { return } + if len(templateErrs) > 0 { + ctx.Flash.Warning(renderErrorOfTemplates(ctx, templateErrs), true) + } + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(unit.TypeIssues) ctx.HTML(http.StatusOK, tplIssueNew) } +func renderErrorOfTemplates(ctx *context.Context, errs map[string]error) string { + var files []string + for k := range errs { + files = append(files, k) + } + sort.Strings(files) // keep the output stable + + var lines []string + for _, file := range files { + lines = append(lines, fmt.Sprintf("%s: %v", file, errs[file])) + } + + flashError, err := ctx.RenderToString(tplAlertDetails, map[string]interface{}{ + "Message": ctx.Tr("repo.issues.choose.ignore_invalid_templates"), + "Summary": ctx.Tr("repo.issues.choose.invalid_templates", len(errs)), + "Details": utils.SanitizeFlashErrorString(strings.Join(lines, "\n")), + }) + if err != nil { + log.Debug("render flash error: %v", err) + flashError = ctx.Tr("repo.issues.choose.ignore_invalid_templates") + } + return flashError +} + // NewIssueChooseTemplate render creating issue from template page func NewIssueChooseTemplate(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.issues.new") ctx.Data["PageIsIssueList"] = true - issueTemplates := ctx.IssueTemplatesFromDefaultBranch() + issueTemplates, errs := ctx.IssueTemplatesErrorsFromDefaultBranch() ctx.Data["IssueTemplates"] = issueTemplates + if len(errs) > 0 { + ctx.Flash.Warning(renderErrorOfTemplates(ctx, errs), true) + } + if len(issueTemplates) == 0 { // The "issues/new" and "issues/new/choose" share the same query parameters "project" and "milestone", if no template here, just redirect to the "issues/new" page with these parameters. ctx.Redirect(fmt.Sprintf("%s/issues/new?%s", ctx.Repo.Repository.HTMLURL(), ctx.Req.URL.RawQuery), http.StatusSeeOther) @@ -1031,6 +1063,13 @@ func NewIssuePost(ctx *context.Context) { return } + content := form.Content + if filename := ctx.Req.Form.Get("template-file"); filename != "" { + if template, err := issue_template.UnmarshalFromRepo(ctx.Repo.GitRepo, ctx.Repo.Repository.DefaultBranch, filename); err == nil { + content = issue_template.RenderToMarkdown(template, ctx.Req.Form) + } + } + issue := &issues_model.Issue{ RepoID: repo.ID, Repo: repo, @@ -1038,7 +1077,7 @@ func NewIssuePost(ctx *context.Context) { PosterID: ctx.Doer.ID, Poster: ctx.Doer, MilestoneID: milestoneID, - Content: form.Content, + Content: content, Ref: form.Ref, } diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 9b2c7c02cb78..aa2c4cdb53b2 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -30,6 +30,7 @@ import ( "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" + issue_template "code.gitea.io/gitea/modules/issue/template" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" @@ -58,11 +59,23 @@ const ( var pullRequestTemplateCandidates = []string{ "PULL_REQUEST_TEMPLATE.md", + "PULL_REQUEST_TEMPLATE.yaml", + "PULL_REQUEST_TEMPLATE.yml", "pull_request_template.md", + "pull_request_template.yaml", + "pull_request_template.yml", ".gitea/PULL_REQUEST_TEMPLATE.md", + ".gitea/PULL_REQUEST_TEMPLATE.yaml", + ".gitea/PULL_REQUEST_TEMPLATE.yml", ".gitea/pull_request_template.md", + ".gitea/pull_request_template.yaml", + ".gitea/pull_request_template.yml", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/PULL_REQUEST_TEMPLATE.yaml", + ".github/PULL_REQUEST_TEMPLATE.yml", ".github/pull_request_template.md", + ".github/pull_request_template.yaml", + ".github/pull_request_template.yml", } func getRepository(ctx *context.Context, repoID int64) *repo_model.Repository { @@ -1194,6 +1207,13 @@ func CompareAndPullRequestPost(ctx *context.Context) { return } + content := form.Content + if filename := ctx.Req.Form.Get("template-file"); filename != "" { + if template, err := issue_template.UnmarshalFromRepo(ctx.Repo.GitRepo, ctx.Repo.Repository.DefaultBranch, filename); err == nil { + content = issue_template.RenderToMarkdown(template, ctx.Req.Form) + } + } + pullIssue := &issues_model.Issue{ RepoID: repo.ID, Repo: repo, @@ -1202,7 +1222,7 @@ func CompareAndPullRequestPost(ctx *context.Context) { Poster: ctx.Doer, MilestoneID: milestoneID, IsPull: true, - Content: form.Content, + Content: content, } pullRequest := &issues_model.PullRequest{ HeadRepoID: ci.HeadRepo.ID, diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl index cf886f529cac..b8a04b89a958 100644 --- a/templates/base/alert.tmpl +++ b/templates/base/alert.tmpl @@ -13,3 +13,8 @@

{{.Flash.InfoMsg | Str2html}}

{{end}} +{{if .Flash.WarningMsg}} +
+

{{.Flash.WarningMsg | Str2html}}

+
+{{end}} diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 5875efaac3a4..e9f2fc3b60bc 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -11,6 +11,14 @@ {{.locale.Tr "action.compare_commits_general"}} {{end}} + {{if .Flash.WarningMsg}} + {{/* + There's alreay a importing of alert.tmpl in new_form.tmpl, + but only the negative message will be displayed within forms for some reasons, see semantic.css:10659. + To avoid repeated negative messages, the importing here if for .Flash.WarningMsg only. + */}} + {{template "base/alert" .}} + {{end}} {{$BaseCompareName := $.BaseName -}} {{- $HeadCompareName := $.HeadRepo.OwnerName -}} {{- if and (eq $.BaseName $.HeadRepo.OwnerName) (ne $.Repository.Name $.HeadRepo.Name) -}} diff --git a/templates/repo/issue/choose.tmpl b/templates/repo/issue/choose.tmpl index bbddd6d9a6ce..609cd4843683 100644 --- a/templates/repo/issue/choose.tmpl +++ b/templates/repo/issue/choose.tmpl @@ -2,6 +2,7 @@
{{template "repo/header" .}}
+ {{template "base/alert" .}} diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl index c1ca69dfb3e2..b70433a96643 100644 --- a/templates/repo/issue/comment_tab.tmpl +++ b/templates/repo/issue/comment_tab.tmpl @@ -1,17 +1,34 @@ - -
-
+{{if .Fields}} + + {{range .Fields}} + {{if eq .Type "input"}} + {{template "repo/issue/fields/input" .}} + {{else if eq .Type "markdown"}} + {{template "repo/issue/fields/markdown" .}} + {{else if eq .Type "textarea"}} + {{template "repo/issue/fields/textarea" .}} + {{else if eq .Type "dropdown"}} + {{template "repo/issue/fields/dropdown" .}} + {{else if eq .Type "checkboxes"}} + {{template "repo/issue/fields/checkboxes" .}} + {{end}} + {{end}} +{{else}} + +
+
+
+
+ {{.locale.Tr "loading"}} +
-
- {{.locale.Tr "loading"}} -
-
+{{end}} {{if .IsAttachmentEnabled}}
{{template "repo/upload" .}} diff --git a/templates/repo/issue/fields/checkboxes.tmpl b/templates/repo/issue/fields/checkboxes.tmpl new file mode 100644 index 000000000000..b70334681f22 --- /dev/null +++ b/templates/repo/issue/fields/checkboxes.tmpl @@ -0,0 +1,12 @@ +
+ {{template "repo/issue/fields/header" .}} + {{$field := .}} + {{range $i, $opt := .Attributes.options}} +
+
+ + +
+
+ {{end}} +
diff --git a/templates/repo/issue/fields/dropdown.tmpl b/templates/repo/issue/fields/dropdown.tmpl new file mode 100644 index 000000000000..83c2bb4aac89 --- /dev/null +++ b/templates/repo/issue/fields/dropdown.tmpl @@ -0,0 +1,14 @@ +
+ {{template "repo/issue/fields/header" .}} + {{/* FIXME: required validation */}} + +
diff --git a/templates/repo/issue/fields/header.tmpl b/templates/repo/issue/fields/header.tmpl new file mode 100644 index 000000000000..fb8511b4f0bd --- /dev/null +++ b/templates/repo/issue/fields/header.tmpl @@ -0,0 +1,6 @@ +{{if .Attributes.label}} +

{{.Attributes.label}}{{if .Validations.required}}{{end}}

+{{end}} +{{if .Attributes.description}} + {{RenderMarkdownToHtml .Attributes.description}} +{{end}} diff --git a/templates/repo/issue/fields/input.tmpl b/templates/repo/issue/fields/input.tmpl new file mode 100644 index 000000000000..d73354f6d392 --- /dev/null +++ b/templates/repo/issue/fields/input.tmpl @@ -0,0 +1,4 @@ +
+ {{template "repo/issue/fields/header" .}} + +
diff --git a/templates/repo/issue/fields/markdown.tmpl b/templates/repo/issue/fields/markdown.tmpl new file mode 100644 index 000000000000..8236171523e0 --- /dev/null +++ b/templates/repo/issue/fields/markdown.tmpl @@ -0,0 +1,3 @@ +
+
{{RenderMarkdownToHtml .Attributes.value}}
+
diff --git a/templates/repo/issue/fields/textarea.tmpl b/templates/repo/issue/fields/textarea.tmpl new file mode 100644 index 000000000000..5ad82e246084 --- /dev/null +++ b/templates/repo/issue/fields/textarea.tmpl @@ -0,0 +1,6 @@ +
+ {{template "repo/issue/fields/header" .}} + {{/* FIXME: preview markdown result */}} + {{/* FIXME: required validation for markdown editor */}} + +
diff --git a/templates/repo/issue/new.tmpl b/templates/repo/issue/new.tmpl index f8929b375d00..9f46f8fddccc 100644 --- a/templates/repo/issue/new.tmpl +++ b/templates/repo/issue/new.tmpl @@ -6,6 +6,14 @@ {{template "repo/issue/navbar" .}}
+ {{if .Flash.WarningMsg}} + {{/* + There's alreay a importing of alert.tmpl in new_form.tmpl, + but only the negative message will be displayed within forms for some reasons, see semantic.css:10659. + To avoid repeated negative messages, the importing here if for .Flash.WarningMsg only. + */}} + {{template "base/alert" .}} + {{end}} {{template "repo/issue/new_form" .}}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index cc6399cab4c5..63b124bd9e76 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -16584,6 +16584,35 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "IssueFormField": { + "description": "IssueFormField represents a form field", + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Attributes" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "type": { + "$ref": "#/definitions/IssueFormFieldType" + }, + "validations": { + "type": "object", + "additionalProperties": {}, + "x-go-name": "Validations" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "IssueFormFieldType": { + "type": "string", + "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", "type": "object", @@ -16608,6 +16637,13 @@ "type": "string", "x-go-name": "About" }, + "body": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueFormField" + }, + "x-go-name": "Fields" + }, "content": { "type": "string", "x-go-name": "Content" diff --git a/web_src/js/features/comp/EasyMDE.js b/web_src/js/features/comp/EasyMDE.js index f1b4b0efc398..015fc3505082 100644 --- a/web_src/js/features/comp/EasyMDE.js +++ b/web_src/js/features/comp/EasyMDE.js @@ -93,7 +93,7 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) { cm.execCommand('delCharBefore'); }, }); - attachTribute(inputField, {mentions: true, emoji: true}); + await attachTribute(inputField, {mentions: true, emoji: true}); attachEasyMDEToElements(easyMDE); return easyMDE; } diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 11c97ccfb011..2c93ca03424b 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -68,9 +68,14 @@ export function initRepoCommentForm() { } (async () => { - const $textarea = $commentForm.find('textarea:not(.review-textarea)'); - const easyMDE = await createCommentEasyMDE($textarea); - initEasyMDEImagePaste(easyMDE, $commentForm.find('.dropzone')); + for (const textarea of $commentForm.find('textarea:not(.review-textarea, .no-easymde)')) { + // Don't initialize EasyMDE for the dormant #edit-content-form + if (textarea.closest('#edit-content-form')) { + continue; + } + const easyMDE = await createCommentEasyMDE(textarea); + initEasyMDEImagePaste(easyMDE, $commentForm.find('.dropzone')); + } })(); initBranchSelector(); @@ -535,9 +540,13 @@ export function initRepository() { $(this).parent().hide(); const $form = $repoComparePull.find('.pullrequest-form'); - const easyMDE = getAttachedEasyMDE($form.find('textarea.edit_area')); $form.show(); - easyMDE.codemirror.refresh(); + $form.find('textarea.edit_area').each(function() { + const easyMDE = getAttachedEasyMDE($(this)); + if (easyMDE) { + easyMDE.codemirror.refresh(); + } + }); }); } diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 96c039c3b432..bed672a35a86 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -2126,7 +2126,8 @@ table th[data-sortt-desc] { margin-top: inherit; } -.flash-error details code { +.flash-error details code, +.flash-warning details code { display: block; text-align: left; } diff --git a/web_src/less/codemirror/base.less b/web_src/less/codemirror/base.less index 87344574634f..db0a93f4c74a 100644 --- a/web_src/less/codemirror/base.less +++ b/web_src/less/codemirror/base.less @@ -1,3 +1,7 @@ +.ui .field:not(:last-child) .EasyMDEContainer .editor-statusbar { + margin-bottom: -1em; // when there is a statusbar, the "margin-bottom: 1em" of the "field" is not needed, because the statusbar is likely a blank line +} + .EasyMDEContainer .CodeMirror { color: var(--color-input-text); background-color: var(--color-input-background); diff --git a/web_src/less/features/dropzone.less b/web_src/less/features/dropzone.less index d31aedff3e1e..ee7a5f1b65d4 100644 --- a/web_src/less/features/dropzone.less +++ b/web_src/less/features/dropzone.less @@ -6,7 +6,6 @@ padding: 0; border-radius: 4px; min-height: 0; - margin-top: -1em; // we have another `field` above, it's usually an EasyMDE editor with "status bar", so we do not need the space above. .dz-message { margin: 10px 0; } From 5710ff343c9f16119ddbff06044e5d61388baa22 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Fri, 2 Sep 2022 20:23:48 +0800 Subject: [PATCH 02/22] chore: add myself to maintainers (#21028) --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 802f04cd933e..8c4af7432355 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -48,3 +48,4 @@ Gusted (@silentcodeg) Wim (@42wim) xinyu (@penlinux) +Jason Song (@wolfogre) From c8ded77680db7344c8dc1ccee76bce0b4e02e103 Mon Sep 17 00:00:00 2001 From: Kyle D Date: Fri, 2 Sep 2022 15:18:23 -0400 Subject: [PATCH 03/22] Kd/ci playwright go test (#20123) * Add initial playwright config * Simplify Makefile * Simplify Makefile * Use correct config files * Update playwright settings * Fix package-lock file * Don't use test logger for e2e tests * fix frontend lint * Allow passing TEST_LOGGER variable * Init postgres database * use standard gitea env variables * Update playwright * update drone * Move empty env var to commands * Cleanup * Move integrations to subfolder * tests integrations to tests integraton * Run e2e tests with go test * Fix linting * install CI deps * Add files to ESlint * Fix drone typo * Don't log to console in CI * Use go test http server * Add build step before tests * Move shared init function to common package * fix drone * Clean up tests * Fix linting * Better mocking for page + version string * Cleanup test generation * Remove dependency on gitea binary * Fix linting * add initial support for running specific tests * Add ACCEPT_VISUAL variable * don't require git-lfs * Add initial documentation * Review feedback * Add logged in session test * Attempt fixing drone race * Cleanup and bump version * Bump deps * Review feedback * simplify installation * Fix ci * Update install docs --- .drone.yml | 69 ++++++ .gitignore | 23 +- CONTRIBUTING.md | 8 +- Makefile | 188 +++++++++++---- build/code-batch-process.go | 6 +- contrib/pr/checkout.go | 2 +- .../doc/developers/guidelines-backend.md | 4 +- .../doc/developers/hacking-on-gitea.en-us.md | 2 +- models/migrations/migrations_test.go | 4 +- models/migrations/testlogger_test.go | 2 +- models/unittest/testdb.go | 4 +- modules/markup/html_test.go | 2 +- modules/markup/markdown/markdown_test.go | 2 +- package-lock.json | 45 ++++ package.json | 1 + playwright.config.js | 100 ++++++++ tests/e2e/README.md | 93 ++++++++ tests/e2e/e2e_test.go | 120 ++++++++++ tests/e2e/example.test.e2e.js | 57 +++++ tests/e2e/utils_e2e.js | 60 +++++ tests/e2e/utils_e2e_test.go | 57 +++++ .../private_repo_on_limited_org.git/HEAD | 0 .../private_repo_on_limited_org.git/config | 0 .../description | 0 .../info/exclude | 0 .../74/8bf557dfc9c6457998b5118a6c8b2129f56c30 | Bin .../a5/46f86c7dd182592b96639045e176dde8df76ef | Bin .../b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 | Bin .../refs/heads/master | 0 .../public_repo_on_limited_org.git/HEAD | 0 .../public_repo_on_limited_org.git/config | 0 .../description | 0 .../info/exclude | 0 .../21/2f14c8b713de38bd0b3fb23bd288369b01668a | Bin .../90/e402c3937a4639725fcc59ca1f529e7dc8506f | Bin .../ed/d9c1000cd1444efd63e153e3554c8d5656bf65 | Bin .../refs/heads/master | 0 .../migration/lfs-test.git/HEAD | 0 .../migration/lfs-test.git/config | 0 .../migration/lfs-test.git/description | 0 .../lfs-test.git/hooks/post-checkout | 0 .../migration/lfs-test.git/hooks/post-commit | 0 .../migration/lfs-test.git/hooks/post-merge | 0 .../migration/lfs-test.git/hooks/pre-push | 0 .../migration/lfs-test.git/index | Bin ...15326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 | 0 ...a92395be4d16f2f63116caf36c8ad35c60831ab041 | 0 .../54/6244003622c64b2fc3c2cd544d7a29882c8383 | Bin .../6a/6ccf5d874fec134ee712572cc03a0f2dd7afec | Bin .../a6/7134b8484c2abe9fa954e1fd83b39b271383ed | Bin .../b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 | Bin .../f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 | Bin .../migration/lfs-test.git/refs/heads/master | 0 .../repo_external_tracker.git/COMMITMESSAGE | 0 .../repo_external_tracker.git/COMMIT_EDITMSG | 0 .../org26/repo_external_tracker.git/HEAD | 0 .../org26/repo_external_tracker.git/config | 0 .../repo_external_tracker.git/config.backup | 0 .../repo_external_tracker.git/description | 0 .../org26/repo_external_tracker.git/index | Bin .../repo_external_tracker.git/info/exclude | 0 .../org26/repo_external_tracker.git/logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../repo_external_tracker_alpha.git/HEAD | 0 .../repo_external_tracker_alpha.git/config | 0 .../config.backup | 0 .../description | 0 .../repo_external_tracker_alpha.git/index | Bin .../info/exclude | 0 .../repo_external_tracker_alpha.git/logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../COMMITMESSAGE | 0 .../COMMIT_EDITMSG | 0 .../repo_external_tracker_numeric.git/HEAD | 0 .../repo_external_tracker_numeric.git/config | 0 .../config.backup | 0 .../description | 0 .../repo_external_tracker_numeric.git/index | Bin .../info/exclude | 0 .../logs/HEAD | 0 .../logs/refs/heads/branch1 | 0 .../logs/refs/heads/master | 0 .../ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 | Bin .../c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb | Bin .../cd/aca8cf1d36e1e4e508a940f6e157e239beccfa | 0 .../refs/heads/branch1 | 0 .../refs/heads/master | 0 .../private_repo_on_private_org.git/HEAD | 0 .../private_repo_on_private_org.git/config | 0 .../description | 0 .../info/exclude | 0 .../6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 | Bin .../7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 | Bin .../b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 | Bin .../refs/heads/master | 0 .../public_repo_on_private_org.git/HEAD | 0 .../public_repo_on_private_org.git/config | 0 .../description | 0 .../info/exclude | 0 .../04/f99c528b643b9175a4b156cdfc13aba6b43853 | Bin .../86/de16d8658f5c0a17ec6aa313871295d7072f78 | Bin .../bf/19fd4707acb403c4aca44f126ab69142ac59ce | Bin .../refs/heads/master | 0 .../user12/repo10.git/HEAD | 0 .../user12/repo10.git/config | 0 .../user12/repo10.git/description | 0 .../user12/repo10.git/hooks/post-receive | 0 .../repo10.git/hooks/post-receive.d/gitea | 0 .../user12/repo10.git/hooks/pre-receive | 0 .../repo10.git/hooks/pre-receive.d/gitea | 0 .../user12/repo10.git/hooks/update | 0 .../user12/repo10.git/hooks/update.d/gitea | 0 .../user12/repo10.git/info/exclude | 0 .../user12/repo10.git/info/refs | 0 .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin .../user12/repo10.git/objects/info/packs | 0 .../repo10.git/refs/heads/DefaultBranch | 0 .../user12/repo10.git/refs/heads/develop | 0 .../user12/repo10.git/refs/heads/feature/1 | 0 .../user12/repo10.git/refs/heads/master | 0 .../user12/repo10.git/refs/tags/v1.1 | 0 .../user13/repo11.git/HEAD | 0 .../user13/repo11.git/config | 0 .../user13/repo11.git/description | 0 .../user13/repo11.git/hooks/post-receive | 0 .../repo11.git/hooks/post-receive.d/gitea | 0 .../user13/repo11.git/hooks/pre-receive | 0 .../repo11.git/hooks/pre-receive.d/gitea | 0 .../user13/repo11.git/hooks/update | 0 .../user13/repo11.git/hooks/update.d/gitea | 0 .../user13/repo11.git/info/exclude | 0 .../user13/repo11.git/info/refs | 0 .../0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 | Bin .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin .../75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 | Bin .../ed/447543e0c85d628b91f7f466f4921908f4c5ea | Bin .../user13/repo11.git/objects/info/packs | 0 .../repo11.git/refs/heads/DefaultBranch | 0 .../user13/repo11.git/refs/heads/branch2 | 0 .../user13/repo11.git/refs/heads/develop | 0 .../user13/repo11.git/refs/heads/feature/1 | 0 .../user13/repo11.git/refs/heads/master | 0 .../user13/repo11.git/refs/tags/v1.1 | 0 .../user2/commits_search_test.git/HEAD | 0 .../user2/commits_search_test.git/config | 2 +- .../user2/commits_search_test.git/description | 0 .../commits_search_test.git/info/exclude | 0 .../0a/8499a22ad32a80beda9d75efe15f9f94582468 | 0 .../0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 | Bin .../3e/a192a6466793d4b7cd8641801ca0c6bec3979c | Bin .../3f/6594f108842b7c50772510e53ce113d3583c4a | Bin .../58/e97d1a24fb9e1599d8a467ec409430f3d3569e | Bin .../67/68c1fc1d9448422f05cc84267d94ee62085fe8 | Bin .../6e/8eabd9a7f8d6acd2a1219facfd37415564b144 | 0 .../85/f46d747a68adf79cc01e2c25ba6a56932d298d | Bin .../8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 | Bin .../95/fd0c4138480e4b3913e7cf71a90623fb926fe8 | Bin .../98/00fe78cabf4fe774fcf376f97fa2a0ed06987b | Bin .../9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a | Bin .../c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 | 0 .../c5/2ba74685f5c8c593efbbb38f62fe024110adef | Bin .../d6/ae8023a10ff446b6a4e7f441554834008e99c3 | Bin .../user2/commits_search_test.git/packed-refs | 0 .../commits_search_test.git/refs/heads/master | 0 .../user2/git_hooks_test.git/HEAD | 0 .../user2/git_hooks_test.git/config | 0 .../user2/git_hooks_test.git/description | 0 .../git_hooks_test.git/hooks/post-receive | 0 .../hooks/post-receive.d/gitea | 0 .../git_hooks_test.git/hooks/pre-receive | 0 .../hooks/pre-receive.d/gitea | 0 .../hooks/pre-receive.d/pre-receive | 0 .../user2/git_hooks_test.git/hooks/update | 0 .../git_hooks_test.git/hooks/update.d/gitea | 0 .../user2/git_hooks_test.git/info/exclude | 0 .../user2/git_hooks_test.git/info/refs | 0 .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin .../git_hooks_test.git/objects/info/packs | 0 .../refs/heads/DefaultBranch | 0 .../git_hooks_test.git/refs/heads/develop | 0 .../git_hooks_test.git/refs/heads/feature/1 | 0 .../git_hooks_test.git/refs/heads/master | 0 .../user2/git_hooks_test.git/refs/tags/v1.1 | 0 .../user2/glob.git/HEAD | 0 .../user2/glob.git/config | 0 .../user2/glob.git/description | 0 .../user2/glob.git/info/exclude | 0 .../48/06cb9df135782b818c968c2fadbd2c150d23d6 | Bin .../59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 | Bin .../7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 | Bin .../8e/592e636d27ac144f92f7fe8c33631cbdea594d | Bin .../95/aff026f99a9ab76fbd01decb63dd3dbc03e498 | Bin .../ae/d1ffed24cc3cf9b80490795e893cae4bddd684 | Bin .../bf/d6a6583f9a9ac59bd726c1df26c64a89427ede | Bin .../c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a | 0 .../de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 | Bin .../ef/6b814b610d8e7717aa0f71fbe5842bcf814697 | 0 .../user2/glob.git/refs/heads/master | 0 .../user2/repo1.git/HEAD | 0 .../user2/repo1.git/config | 0 .../user2/repo1.git/description | 0 .../user2/repo1.git/hooks/post-receive | 0 .../repo1.git/hooks/post-receive.d/gitea | 0 .../user2/repo1.git/hooks/pre-receive | 0 .../user2/repo1.git/hooks/pre-receive.d/gitea | 0 .../user2/repo1.git/hooks/update | 0 .../user2/repo1.git/hooks/update.d/gitea | 0 .../user2/repo1.git/info/exclude | 0 .../user2/repo1.git/info/refs | 0 .../00/750edc07d6415dcc07ae0351e9397b0222b7ba | Bin .../2a/2f1d4670728a2e10049e345bd7a276468beab6 | Bin .../3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 | Bin .../4a/357436d925b5c974181ff12a994538ddc5a269 | Bin .../4b/4851ad51df6a7d9f25c979345979eaeb5b349f | Bin .../5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 | Bin .../5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd | Bin .../62/fb502a7172d4453f0322a2cc85bddffa57f07a | Bin .../65/f1bf27bc3bf70f64657658635e66094edbcb4d | Bin .../6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb | Bin .../7c/4df115542e05c700f297519e906fd63c9c9804 | Bin .../90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 | 0 .../94/922e1295c678267de1193b7b84ad8a086c27f9 | Bin .../98/5f0301dba5e7b34be866819cd15ad3d8f508ee | Bin .../a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a | Bin .../a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d | Bin .../b2/60587271671842af0b036e4fe643c9d45b7ddd | Bin .../d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 | Bin .../d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 | Bin .../dc/7a8ba127fee870dd683310ce660dfe59333a1b | Bin .../dd/59742c0f6672911f2b64cba5711ac00593ed32 | Bin .../user2/repo1.git/objects/info/packs | 0 .../user2/repo1.git/refs/heads/DefaultBranch | 0 .../user2/repo1.git/refs/heads/branch2 | 0 .../user2/repo1.git/refs/heads/develop | 0 .../user2/repo1.git/refs/heads/feature/1 | 0 .../user2/repo1.git/refs/heads/master | 0 .../user2/repo1.git/refs/heads/pr-to-update | 0 .../user2/repo1.git/refs/notes/commits | 0 .../user2/repo1.git/refs/pull/2/head | 0 .../user2/repo1.git/refs/pull/3/head | 0 .../user2/repo1.git/refs/pull/5/head | 0 .../user2/repo1.git/refs/tags/v1.1 | 0 .../user2/repo1.wiki.git/HEAD | 0 .../user2/repo1.wiki.git/config | 0 .../user2/repo1.wiki.git/description | 0 .../user2/repo1.wiki.git/info/exclude | 0 .../0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 | 0 .../0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 | Bin .../2c/54faec6c45d31c1abfaecdab471eac6633738a | Bin .../32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 | Bin .../42/3313fbd38093bb10d0c8387db9105409c6f196 | Bin .../71/911bf48766c7181518c1070911019fbb00b1fc | 0 .../72/fc6251cc648e914c10009d31431fa2e38b9a20 | Bin .../74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e | Bin .../7c/d7c8fa852973c72c66eb120a6677c54a8697f7 | Bin .../89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c | Bin .../c1/0d10b7e655b3dab1f53176db57c8219a5488d6 | 0 .../c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 | Bin .../e5/3d079e581fbfdea1075a54d5b621eab0090e52 | Bin .../ea/82fc8777a24b07c26b3a4bf4e2742c03733eab | Bin .../f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 | Bin .../user2/repo1.wiki.git/refs/heads/master | 0 .../user2/repo15.git/HEAD | 0 .../user2/repo15.git/config | 0 .../user2/repo15.git/description | 0 .../user2/repo15.git/hooks/post-receive | 0 .../repo15.git/hooks/post-receive.d/gitea | 0 .../user2/repo15.git/hooks/pre-receive | 0 .../repo15.git/hooks/pre-receive.d/gitea | 0 .../user2/repo15.git/hooks/update | 0 .../user2/repo15.git/hooks/update.d/gitea | 0 .../user2/repo15.git/info/exclude | 0 .../user2/repo16.git/HEAD | 0 .../user2/repo16.git/config | 0 .../user2/repo16.git/description | 0 .../user2/repo16.git/info/exclude | 0 .../0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 | Bin .../24/f83a471f77579fea57bac7255d6e64e70fce1c | Bin .../27/566bd5738fc8b4e3fef3c5e72cce608537bd95 | Bin .../3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f | 0 .../45/8121ce9a6b855c9733bae62093caf3f39685de | Bin .../50/99b81332712fe655e34e8dd63574f503f61811 | 0 .../69/554a64c1e6030f051e5c3f94bfbd773cd6a324 | Bin .../a4/3476a501516e065c5a82f05fd58fd319598bc1 | Bin .../e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac | Bin .../f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 | Bin .../f9/0451c72ef61a7645293d17b47be7a8e983da57 | Bin .../user2/repo16.git/refs/heads/good-sign | 0 .../refs/heads/good-sign-not-yet-validated | 0 .../user2/repo16.git/refs/heads/master | 0 .../user2/repo16.git/refs/heads/not-signed | 0 .../user2/repo2.git/HEAD | 0 .../user2/repo2.git/config | 0 .../user2/repo2.git/description | 0 .../user2/repo2.git/info/exclude | 0 .../user2/repo2.git/info/refs | 0 .../0a/7d8b41ae9763e9a1743917396839d1791d49d0 | Bin .../0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 | 0 .../10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 | 0 .../1c/887eaa8d81fa86da7695d8f635cf17813eb422 | 0 .../26/f842bcad37fa40a1bb34cbb5ee219ee35d863d | Bin .../32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 | Bin .../36/fff01c8c9f722d49d53186abd27b5be8d85338 | Bin .../42/3313fbd38093bb10d0c8387db9105409c6f196 | Bin .../71/911bf48766c7181518c1070911019fbb00b1fc | 0 .../72/fc6251cc648e914c10009d31431fa2e38b9a20 | Bin .../74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e | Bin .../7c/d7c8fa852973c72c66eb120a6677c54a8697f7 | Bin .../ba/1aed4e2ea2443d76cec241b96be4ec990852ec | Bin .../c1/0d10b7e655b3dab1f53176db57c8219a5488d6 | 0 .../c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 | Bin .../f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 | Bin .../user2/repo2.git/objects/info/commit-graph | Bin .../user2/repo2.git/objects/info/packs | 0 ...d943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap | Bin ...f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx | Bin ...7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack | Bin .../user2/repo2.git/packed-refs | 0 .../user2/repo2.git/refs/heads/master | 0 .../user2/repo20.git/HEAD | 0 .../user2/repo20.git/config | 0 .../user2/repo20.git/description | 0 .../user2/repo20.git/hooks/post-receive | 0 .../repo20.git/hooks/post-receive.d/gitea | 0 .../user2/repo20.git/hooks/pre-receive | 0 .../repo20.git/hooks/pre-receive.d/gitea | 0 .../user2/repo20.git/hooks/update | 0 .../user2/repo20.git/hooks/update.d/gitea | 0 .../user2/repo20.git/info/exclude | 0 .../user2/repo20.git/info/refs | 0 .../02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 | Bin .../05/81d7edf45206787ff93956ea892e8a2ae77604 | Bin .../1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 | Bin .../29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 | Bin .../2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 | Bin .../41/4a282859758ba7b159bfbd9c2b193eb8f135ee | Bin .../80/8038d2f71b0ab020991439cffd24309c7bc530 | Bin .../83/70977f63979e140b6b58992b1fdb4098b24cd9 | Bin .../8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 | Bin .../ba/3aeafe10402c6b29535a58d91def7e43638d9d | Bin .../c5/0ac6b9e25abb8200bb377755367d7265c581cf | Bin .../ce/013625030ba8dba906f756967f9e9ca394464a | Bin .../db/89c972fc57862eae378f45b74aca228037d415 | Bin .../user2/repo20.git/objects/info/packs | 0 .../user2/repo20.git/refs/heads/master | 0 .../user2/utf8.git/HEAD | 0 .../user2/utf8.git/config | 0 .../user2/utf8.git/description | 0 .../user2/utf8.git/hooks/post-receive | 0 .../user2/utf8.git/hooks/post-receive.d/gitea | 0 .../user2/utf8.git/hooks/pre-receive | 0 .../user2/utf8.git/hooks/pre-receive.d/gitea | 0 .../user2/utf8.git/hooks/update | 0 .../user2/utf8.git/hooks/update.d/gitea | 0 .../user2/utf8.git/info/exclude | 0 .../user2/utf8.git/info/refs | 0 .../14/c42687126acae9d1ad41d7bdb528f811065a6a | Bin .../1d/5e00f305a7ca6a8a94e65456820a6d260adab8 | Bin .../28/d579e4920fbf4f66e71dab3e779d9fbf41422a | 0 .../3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b | Bin .../3a/a73c3499bff049a352b4e265575373e964b89a | Bin .../3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 | Bin .../4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a | Bin .../50/4d9fe743979d4e9785a25a363c7007293f0838 | Bin .../56/92bcf9f7c9eacb1ad68442161f2573877f96f4 | Bin .../59/e2c41e8f5140bb0182acebec17c8ad9831cc62 | Bin .../64/89894ad11093fdc49c0ed857d80682344a7264 | Bin .../6d/0c79ce3401c67d1ad522e61c47083a9fdee16c | Bin .../84/7c6d93c6860dd377651245711b7fbcd34a18d4 | Bin .../9b/9cc8f558d1c4f815592496fa24308ba2a9c824 | Bin .../a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad | Bin .../a9/a61830fbf4e84999d3b20cf178954366701fe5 | Bin .../c7/85b65bf16928b58567cb23669125c0ccd25a4f | Bin .../e9/63733b8a355cf860c465b4af7b236a6ef08783 | Bin .../eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 | 0 .../ee/9686cb562f492f64381bff7f298b2a1c67a141 | Bin .../f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 | Bin .../user2/utf8.git/objects/info/packs | 0 .../utf8.git/refs/heads/Gr\303\274\303\237en" | 0 .../utf8.git/refs/heads/Plus+Is+Not+Space | 0 .../user2/utf8.git/refs/heads/master | 0 ...7\320\222\320\265\321\202\320\272\320\260" | 0 .../refs/heads/\320\260/\320\261/\320\262" | 0 ...3\226\343\203\251\343\203\263\343\203\201" | 0 .../utf8.git/refs/tags/\320\201/\344\272\272" | 0 .../refs/tags/\320\242\321\215\320\263" | 0 .../refs/tags/\343\202\277\343\202\260" | 0 .../user27/repo49.git/HEAD | 0 .../user27/repo49.git/config | 0 .../user27/repo49.git/description | 0 .../user27/repo49.git/hooks/post-receive | 0 .../repo49.git/hooks/post-receive.d/gitea | 0 .../user27/repo49.git/hooks/pre-receive | 0 .../repo49.git/hooks/pre-receive.d/gitea | 0 .../user27/repo49.git/hooks/update | 0 .../user27/repo49.git/hooks/update.d/gitea | 0 .../user27/repo49.git/info/exclude | 0 .../user27/repo49.git/info/refs | 0 .../47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 | Bin .../4d/31f3a12656368a8d9180f431d40d0fc408be2d | Bin .../51/f84af231345367fd5d61ceb89efb3b6d757061 | Bin .../79/3aa682b06ae032641abf70c5dfeade28c07c52 | Bin .../aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 | Bin .../dd/392e939ea4936b2459219c9c9a1f25547ccaeb | Bin .../f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f | Bin .../user27/repo49.git/objects/info/packs | 0 .../user27/repo49.git/refs/heads/master | 0 .../user27/repo49.git/refs/heads/test/archive | 0 .../user27/template1.git/HEAD | 0 .../user27/template1.git/config | 0 .../user27/template1.git/description | 0 .../user27/template1.git/hooks/post-receive | 0 .../template1.git/hooks/post-receive.d/gitea | 0 .../user27/template1.git/hooks/pre-receive | 0 .../template1.git/hooks/pre-receive.d/gitea | 0 .../user27/template1.git/hooks/update | 0 .../user27/template1.git/hooks/update.d/gitea | 0 .../user27/template1.git/info/exclude | 0 .../user27/template1.git/info/refs | 0 .../47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 | Bin .../4d/31f3a12656368a8d9180f431d40d0fc408be2d | Bin .../51/f84af231345367fd5d61ceb89efb3b6d757061 | Bin .../79/3aa682b06ae032641abf70c5dfeade28c07c52 | Bin .../aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 | Bin .../dd/392e939ea4936b2459219c9c9a1f25547ccaeb | Bin .../f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f | Bin .../user27/template1.git/objects/info/packs | 0 .../user27/template1.git/refs/heads/master | 0 .../user3/repo3.git/HEAD | 0 .../user3/repo3.git/config | 0 .../user3/repo3.git/description | 0 .../user3/repo3.git/hooks/post-receive | 0 .../repo3.git/hooks/post-receive.d/gitea | 0 .../user3/repo3.git/hooks/pre-receive | 0 .../user3/repo3.git/hooks/pre-receive.d/gitea | 0 .../user3/repo3.git/hooks/update | 0 .../user3/repo3.git/hooks/update.d/gitea | 0 .../user3/repo3.git/info/exclude | 0 .../20/ade30d25e0ecaeec84e7f542a8456900858240 | Bin .../27/74debeea6dc742cc4971a92db0e08b95b60588 | Bin .../2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 | Bin .../2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f | Bin .../d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 | Bin .../d5/6a3073c1dbb7b15963110a049d50cdb5db99fc | Bin .../ec/f0db3c1ec806522de4b491fb9a3c7457398c61 | Bin .../ee/16d127df463aa491e08958120f2108b02468df | Bin .../user3/repo3.git/refs/heads/master | 0 .../user3/repo3.git/refs/heads/test_branch | 0 .../user30/empty.git/HEAD | 0 .../user30/empty.git/config | 0 .../user5/repo4.git/HEAD | 0 .../user5/repo4.git/config | 0 .../user5/repo4.git/description | 0 .../user5/repo4.git/info/exclude | 0 .../16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 | Bin .../c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f | Bin .../c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 | Bin .../user5/repo4.git/refs/heads/master | 0 {integrations => tests/integration}/README.md | 16 +- .../integration}/README_ZH.md | 2 +- .../integration}/admin_user_test.go | 11 +- .../api_activitypub_person_test.go | 2 +- .../integration}/api_admin_org_test.go | 5 +- .../integration}/api_admin_test.go | 23 +- .../integration}/api_branch_test.go | 13 +- .../integration}/api_comment_test.go | 17 +- .../integration}/api_fork_test.go | 5 +- .../integration}/api_gpg_keys_test.go | 5 +- .../api_helper_for_declarative_test.go | 2 +- .../integration}/api_httpsig_test.go | 7 +- .../integration}/api_issue_label_test.go | 2 +- .../integration}/api_issue_milestone_test.go | 5 +- .../integration}/api_issue_reaction_test.go | 7 +- .../integration}/api_issue_stopwatch_test.go | 11 +- .../api_issue_subscription_test.go | 5 +- .../integration}/api_issue_test.go | 13 +- .../api_issue_tracked_time_test.go | 9 +- .../integration}/api_keys_test.go | 17 +- .../integration}/api_nodeinfo_test.go | 2 +- .../integration}/api_notification_test.go | 7 +- .../integration}/api_oauth2_apps_test.go | 5 +- .../integration}/api_org_test.go | 5 +- .../api_packages_composer_test.go | 19 +- .../integration}/api_packages_conan_test.go | 47 ++-- .../api_packages_container_test.go | 43 ++-- .../integration}/api_packages_generic_test.go | 25 +- .../integration}/api_packages_helm_test.go | 11 +- .../integration}/api_packages_maven_test.go | 25 +- .../integration}/api_packages_npm_test.go | 27 ++- .../integration}/api_packages_nuget_test.go | 29 +-- .../integration}/api_packages_pub_test.go | 11 +- .../integration}/api_packages_pypi_test.go | 17 +- .../api_packages_rubygems_test.go | 17 +- .../integration}/api_packages_test.go | 17 +- .../integration}/api_packages_vagrant_test.go | 13 +- .../integration}/api_private_serv_test.go | 2 +- .../integration}/api_pull_commits_test.go | 5 +- .../integration}/api_pull_review_test.go | 7 +- .../integration}/api_pull_test.go | 15 +- .../integration}/api_releases_test.go | 15 +- .../integration}/api_repo_archive_test.go | 5 +- .../api_repo_collaborator_test.go | 2 +- .../integration}/api_repo_edit_test.go | 2 +- .../integration}/api_repo_file_create_test.go | 2 +- .../integration}/api_repo_file_delete_test.go | 2 +- .../integration}/api_repo_file_get_test.go | 5 +- .../integration}/api_repo_file_helpers.go | 2 +- .../integration}/api_repo_file_update_test.go | 2 +- .../api_repo_get_contents_list_test.go | 2 +- .../api_repo_get_contents_test.go | 2 +- .../integration}/api_repo_git_blobs_test.go | 5 +- .../integration}/api_repo_git_commits_test.go | 15 +- .../integration}/api_repo_git_hook_test.go | 21 +- .../integration}/api_repo_git_notes_test.go | 2 +- .../integration}/api_repo_git_ref_test.go | 5 +- .../integration}/api_repo_git_tags_test.go | 7 +- .../integration}/api_repo_git_trees_test.go | 5 +- .../integration}/api_repo_languages_test.go | 2 +- .../integration}/api_repo_lfs_locks_test.go | 9 +- .../integration}/api_repo_lfs_migrate_test.go | 5 +- .../integration}/api_repo_lfs_test.go | 59 ++--- .../integration}/api_repo_raw_test.go | 5 +- .../integration}/api_repo_tags_test.go | 5 +- .../integration}/api_repo_teams_test.go | 5 +- .../integration}/api_repo_test.go | 31 +-- .../integration}/api_repo_topic_test.go | 7 +- .../integration}/api_settings_test.go | 5 +- .../integration}/api_team_test.go | 9 +- .../integration}/api_team_user_test.go | 5 +- .../integration}/api_token_test.go | 7 +- .../integration}/api_user_email_test.go | 9 +- .../integration}/api_user_heatmap_test.go | 5 +- .../integration}/api_user_org_perm_test.go | 11 +- .../integration}/api_user_orgs_test.go | 7 +- .../integration}/api_user_search_test.go | 11 +- .../integration}/api_wiki_test.go | 13 +- .../integration}/attachment_test.go | 9 +- .../integration}/auth_ldap_test.go | 19 +- .../integration}/benchmarks_test.go | 2 +- .../integration}/branches_test.go | 7 +- .../change_default_branch_test.go | 5 +- .../integration}/cmd_keys_test.go | 2 +- .../integration}/compare_test.go | 7 +- .../integration}/cors_test.go | 5 +- .../integration}/create_no_session_test.go | 9 +- .../integration}/csrf_test.go | 5 +- .../integration}/delete_user_test.go | 7 +- .../integration}/download_test.go | 15 +- .../integration}/dump_restore_test.go | 2 +- .../integration}/editor_test.go | 2 +- .../integration}/empty_repo_test.go | 5 +- .../integration}/eventsource_test.go | 5 +- .../integration}/explore_repos_test.go | 6 +- .../integration}/git_clone_wiki_test.go | 5 +- .../git_helper_for_declarative_test.go | 5 +- .../integration}/git_smart_http_test.go | 2 +- .../integration}/git_test.go | 39 +-- .../integration}/goget_test.go | 5 +- .../integration}/gpg_git_test.go | 33 +-- .../integration}/html_helper.go | 2 +- .../integration}/integration_test.go | 215 +---------------- .../integration}/issue_test.go | 29 +-- .../integration}/lfs_getobject_test.go | 15 +- .../integration}/lfs_local_endpoint_test.go | 5 +- .../integration}/links_test.go | 11 +- .../integration}/migrate_test.go | 2 +- .../migration-test/gitea-v1.6.4.mssql.sql.gz | Bin .../migration-test/gitea-v1.6.4.mysql.sql.gz | Bin .../gitea-v1.6.4.postgres.sql.gz | Bin .../gitea-v1.6.4.sqlite3.sql.gz | Bin .../migration-test/gitea-v1.7.0.mssql.sql.gz | Bin .../migration-test/gitea-v1.7.0.mysql.sql.gz | Bin .../gitea-v1.7.0.postgres.sql.gz | Bin .../gitea-v1.7.0.sqlite3.sql.gz | Bin .../migration-test/migration_test.go | 26 +- .../integration}/mirror_pull_test.go | 5 +- .../integration}/mirror_push_test.go | 5 +- .../integration}/nonascii_branches_test.go | 5 +- .../integration}/oauth_test.go | 23 +- .../integration}/org_count_test.go | 2 +- .../integration}/org_test.go | 15 +- .../integration}/private-testing.key | 0 .../integration}/privateactivity_test.go | 55 ++--- .../integration}/pull_compare_test.go | 5 +- .../integration}/pull_create_test.go | 5 +- .../integration}/pull_merge_test.go | 2 +- .../integration}/pull_review_test.go | 6 +- .../integration}/pull_status_test.go | 2 +- .../integration}/pull_update_test.go | 2 +- .../integration}/release_test.go | 21 +- .../integration}/rename_branch_test.go | 2 +- .../integration}/repo_activity_test.go | 2 +- .../integration}/repo_branch_test.go | 5 +- .../integration}/repo_commits_search_test.go | 5 +- .../integration}/repo_commits_test.go | 7 +- .../integration}/repo_fork_test.go | 7 +- .../integration}/repo_generate_test.go | 7 +- .../integration}/repo_migrate_test.go | 5 +- .../integration}/repo_search_test.go | 5 +- .../integration}/repo_tag_test.go | 7 +- .../integration}/repo_test.go | 17 +- .../integration}/repo_topic_test.go | 5 +- .../integration}/repo_watch_test.go | 2 +- .../integration}/repofiles_delete_test.go | 2 +- .../integration}/repofiles_update_test.go | 2 +- .../integration}/setting_test.go | 9 +- .../integration}/signin_test.go | 5 +- .../integration}/signout_test.go | 6 +- .../integration}/signup_test.go | 9 +- .../integration}/ssh_key_test.go | 2 +- .../integration}/timetracking_test.go | 9 +- .../integration}/user_avatar_test.go | 2 +- .../integration}/user_test.go | 15 +- .../integration}/version_test.go | 5 +- .../integration}/view_test.go | 5 +- .../integration}/webfinger_test.go | 5 +- .../integration}/xss_test.go | 5 +- {integrations => tests}/mssql.ini.tmpl | 28 +-- {integrations => tests}/mysql.ini.tmpl | 18 +- {integrations => tests}/mysql8.ini.tmpl | 26 +- {integrations => tests}/pgsql.ini.tmpl | 28 +-- {integrations => tests}/sqlite.ini.tmpl | 30 +-- tests/test_utils.go | 224 ++++++++++++++++++ {integrations => tests}/testlogger.go | 26 +- 644 files changed, 1857 insertions(+), 1027 deletions(-) create mode 100644 playwright.config.js create mode 100644 tests/e2e/README.md create mode 100644 tests/e2e/e2e_test.go create mode 100644 tests/e2e/example.test.e2e.js create mode 100644 tests/e2e/utils_e2e.js create mode 100644 tests/e2e/utils_e2e_test.go rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 (100%) rename {integrations => tests}/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/index (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 (100%) rename {integrations => tests}/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/index (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 (100%) rename {integrations => tests}/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce (100%) rename {integrations => tests}/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/refs/heads/DefaultBranch (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/refs/heads/develop (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/refs/heads/feature/1 (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user12/repo10.git/refs/tags/v1.1 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/ed/447543e0c85d628b91f7f466f4921908f4c5ea (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/heads/DefaultBranch (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/heads/branch2 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/heads/develop (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/heads/feature/1 (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user13/repo11.git/refs/tags/v1.1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/config (53%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/0a/8499a22ad32a80beda9d75efe15f9f94582468 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/3e/a192a6466793d4b7cd8641801ca0c6bec3979c (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/3f/6594f108842b7c50772510e53ce113d3583c4a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/58/e97d1a24fb9e1599d8a467ec409430f3d3569e (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/67/68c1fc1d9448422f05cc84267d94ee62085fe8 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/6e/8eabd9a7f8d6acd2a1219facfd37415564b144 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/85/f46d747a68adf79cc01e2c25ba6a56932d298d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/95/fd0c4138480e4b3913e7cf71a90623fb926fe8 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/98/00fe78cabf4fe774fcf376f97fa2a0ed06987b (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/c5/2ba74685f5c8c593efbbb38f62fe024110adef (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/objects/d6/ae8023a10ff446b6a4e7f441554834008e99c3 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/packed-refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/commits_search_test.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/DefaultBranch (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/develop (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/feature/1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/git_hooks_test.git/refs/tags/v1.1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/48/06cb9df135782b818c968c2fadbd2c150d23d6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/8e/592e636d27ac144f92f7fe8c33631cbdea594d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/95/aff026f99a9ab76fbd01decb63dd3dbc03e498 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/ae/d1ffed24cc3cf9b80490795e893cae4bddd684 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/bf/d6a6583f9a9ac59bd726c1df26c64a89427ede (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/objects/ef/6b814b610d8e7717aa0f71fbe5842bcf814697 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/glob.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/00/750edc07d6415dcc07ae0351e9397b0222b7ba (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/4a/357436d925b5c974181ff12a994538ddc5a269 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/62/fb502a7172d4453f0322a2cc85bddffa57f07a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/7c/4df115542e05c700f297519e906fd63c9c9804 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/94/922e1295c678267de1193b7b84ad8a086c27f9 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/98/5f0301dba5e7b34be866819cd15ad3d8f508ee (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/b2/60587271671842af0b036e4fe643c9d45b7ddd (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/dc/7a8ba127fee870dd683310ce660dfe59333a1b (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/dd/59742c0f6672911f2b64cba5711ac00593ed32 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/branch2 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/develop (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/heads/pr-to-update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/notes/commits (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/pull/2/head (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/pull/3/head (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/pull/5/head (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.git/refs/tags/v1.1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/2c/54faec6c45d31c1abfaecdab471eac6633738a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/e5/3d079e581fbfdea1075a54d5b621eab0090e52 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/ea/82fc8777a24b07c26b3a4bf4e2742c03733eab (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo15.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/0a/7d8b41ae9763e9a1743917396839d1791d49d0 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/1c/887eaa8d81fa86da7695d8f635cf17813eb422 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/36/fff01c8c9f722d49d53186abd27b5be8d85338 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/info/commit-graph (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/packed-refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo2.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/05/81d7edf45206787ff93956ea892e8a2ae77604 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/41/4a282859758ba7b159bfbd9c2b193eb8f135ee (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/80/8038d2f71b0ab020991439cffd24309c7bc530 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/83/70977f63979e140b6b58992b1fdb4098b24cd9 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/ba/3aeafe10402c6b29535a58d91def7e43638d9d (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/c5/0ac6b9e25abb8200bb377755367d7265c581cf (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/db/89c972fc57862eae378f45b74aca228037d415 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/repo20.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/14/c42687126acae9d1ad41d7bdb528f811065a6a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/1d/5e00f305a7ca6a8a94e65456820a6d260adab8 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/28/d579e4920fbf4f66e71dab3e779d9fbf41422a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/3a/a73c3499bff049a352b4e265575373e964b89a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/50/4d9fe743979d4e9785a25a363c7007293f0838 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/56/92bcf9f7c9eacb1ad68442161f2573877f96f4 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/59/e2c41e8f5140bb0182acebec17c8ad9831cc62 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/64/89894ad11093fdc49c0ed857d80682344a7264 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/6d/0c79ce3401c67d1ad522e61c47083a9fdee16c (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/84/7c6d93c6860dd377651245711b7fbcd34a18d4 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/9b/9cc8f558d1c4f815592496fa24308ba2a9c824 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/a9/a61830fbf4e84999d3b20cf178954366701fe5 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/c7/85b65bf16928b58567cb23669125c0ccd25a4f (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/e9/63733b8a355cf860c465b4af7b236a6ef08783 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/ee/9686cb562f492f64381bff7f298b2a1c67a141 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/objects/info/packs (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" => "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/refs/heads/Plus+Is+Not+Space (100%) rename {integrations => tests}/gitea-repositories-meta/user2/utf8.git/refs/heads/master (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" => "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" => "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" => "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" => "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" => "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" (100%) rename "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" => "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/info/refs (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/objects/info/packs (100%) rename {integrations => tests}/gitea-repositories-meta/user27/template1.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/post-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/update (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/refs/heads/master (100%) rename {integrations => tests}/gitea-repositories-meta/user3/repo3.git/refs/heads/test_branch (100%) rename {integrations => tests}/gitea-repositories-meta/user30/empty.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user30/empty.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/HEAD (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/config (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/description (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/info/exclude (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/objects/16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/objects/c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/objects/c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 (100%) rename {integrations => tests}/gitea-repositories-meta/user5/repo4.git/refs/heads/master (100%) rename {integrations => tests/integration}/README.md (93%) rename {integrations => tests/integration}/README_ZH.md (98%) rename {integrations => tests/integration}/admin_user_test.go (92%) rename {integrations => tests/integration}/api_activitypub_person_test.go (99%) rename {integrations => tests/integration}/api_admin_org_test.go (97%) rename {integrations => tests/integration}/api_admin_test.go (95%) rename {integrations => tests/integration}/api_branch_test.go (96%) rename {integrations => tests/integration}/api_comment_test.go (96%) rename {integrations => tests/integration}/api_fork_test.go (84%) rename {integrations => tests/integration}/api_gpg_keys_test.go (99%) rename {integrations => tests/integration}/api_helper_for_declarative_test.go (99%) rename {integrations => tests/integration}/api_httpsig_test.go (98%) rename {integrations => tests/integration}/api_issue_label_test.go (99%) rename {integrations => tests/integration}/api_issue_milestone_test.go (97%) rename {integrations => tests/integration}/api_issue_reaction_test.go (97%) rename {integrations => tests/integration}/api_issue_stopwatch_test.go (95%) rename {integrations => tests/integration}/api_issue_subscription_test.go (97%) rename {integrations => tests/integration}/api_issue_test.go (98%) rename {integrations => tests/integration}/api_issue_tracked_time_test.go (97%) rename {integrations => tests/integration}/api_keys_test.go (96%) rename {integrations => tests/integration}/api_nodeinfo_test.go (98%) rename {integrations => tests/integration}/api_notification_test.go (98%) rename {integrations => tests/integration}/api_oauth2_apps_test.go (98%) rename {integrations => tests/integration}/api_org_test.go (98%) rename {integrations => tests/integration}/api_packages_composer_test.go (95%) rename {integrations => tests/integration}/api_packages_conan_test.go (96%) rename {integrations => tests/integration}/api_packages_container_test.go (96%) rename {integrations => tests/integration}/api_packages_generic_test.go (92%) rename {integrations => tests/integration}/api_packages_helm_test.go (96%) rename {integrations => tests/integration}/api_packages_maven_test.go (94%) rename {integrations => tests/integration}/api_packages_npm_test.go (95%) rename {integrations => tests/integration}/api_packages_nuget_test.go (96%) rename {integrations => tests/integration}/api_packages_pub_test.go (96%) rename {integrations => tests/integration}/api_packages_pypi_test.go (94%) rename {integrations => tests/integration}/api_packages_rubygems_test.go (97%) rename {integrations => tests/integration}/api_packages_test.go (95%) rename {integrations => tests/integration}/api_packages_vagrant_test.go (95%) rename {integrations => tests/integration}/api_private_serv_test.go (99%) rename {integrations => tests/integration}/api_pull_commits_test.go (93%) rename {integrations => tests/integration}/api_pull_review_test.go (99%) rename {integrations => tests/integration}/api_pull_test.go (96%) rename {integrations => tests/integration}/api_releases_test.go (96%) rename {integrations => tests/integration}/api_repo_archive_test.go (95%) rename {integrations => tests/integration}/api_repo_collaborator_test.go (99%) rename {integrations => tests/integration}/api_repo_edit_test.go (99%) rename {integrations => tests/integration}/api_repo_file_create_test.go (99%) rename {integrations => tests/integration}/api_repo_file_delete_test.go (99%) rename {integrations => tests/integration}/api_repo_file_get_test.go (95%) rename {integrations => tests/integration}/api_repo_file_helpers.go (97%) rename {integrations => tests/integration}/api_repo_file_update_test.go (99%) rename {integrations => tests/integration}/api_repo_get_contents_list_test.go (99%) rename {integrations => tests/integration}/api_repo_get_contents_test.go (99%) rename {integrations => tests/integration}/api_repo_git_blobs_test.go (97%) rename {integrations => tests/integration}/api_repo_git_commits_test.go (95%) rename {integrations => tests/integration}/api_repo_git_hook_test.go (94%) rename {integrations => tests/integration}/api_repo_git_notes_test.go (98%) rename {integrations => tests/integration}/api_repo_git_ref_test.go (93%) rename {integrations => tests/integration}/api_repo_git_tags_test.go (96%) rename {integrations => tests/integration}/api_repo_git_trees_test.go (97%) rename {integrations => tests/integration}/api_repo_languages_test.go (98%) rename {integrations => tests/integration}/api_repo_lfs_locks_test.go (98%) rename {integrations => tests/integration}/api_repo_lfs_migrate_test.go (95%) rename {integrations => tests/integration}/api_repo_lfs_test.go (92%) rename {integrations => tests/integration}/api_repo_raw_test.go (93%) rename {integrations => tests/integration}/api_repo_tags_test.go (97%) rename {integrations => tests/integration}/api_repo_teams_test.go (97%) rename {integrations => tests/integration}/api_repo_test.go (98%) rename {integrations => tests/integration}/api_repo_topic_test.go (98%) rename {integrations => tests/integration}/api_settings_test.go (96%) rename {integrations => tests/integration}/api_team_test.go (98%) rename {integrations => tests/integration}/api_team_user_test.go (94%) rename {integrations => tests/integration}/api_token_test.go (94%) rename {integrations => tests/integration}/api_user_email_test.go (94%) rename {integrations => tests/integration}/api_user_heatmap_test.go (92%) rename {integrations => tests/integration}/api_user_org_perm_test.go (95%) rename {integrations => tests/integration}/api_user_orgs_test.go (96%) rename {integrations => tests/integration}/api_user_search_test.go (93%) rename {integrations => tests/integration}/api_wiki_test.go (96%) rename {integrations => tests/integration}/attachment_test.go (96%) rename {integrations => tests/integration}/auth_ldap_test.go (97%) rename {integrations => tests/integration}/benchmarks_test.go (99%) rename {integrations => tests/integration}/branches_test.go (94%) rename {integrations => tests/integration}/change_default_branch_test.go (93%) rename {integrations => tests/integration}/cmd_keys_test.go (99%) rename {integrations => tests/integration}/compare_test.go (91%) rename {integrations => tests/integration}/cors_test.go (88%) rename {integrations => tests/integration}/create_no_session_test.go (95%) rename {integrations => tests/integration}/csrf_test.go (95%) rename {integrations => tests/integration}/delete_user_test.go (94%) rename {integrations => tests/integration}/download_test.go (91%) rename {integrations => tests/integration}/dump_restore_test.go (99%) rename {integrations => tests/integration}/editor_test.go (99%) rename {integrations => tests/integration}/empty_repo_test.go (91%) rename {integrations => tests/integration}/eventsource_test.go (96%) rename {integrations => tests/integration}/explore_repos_test.go (79%) rename {integrations => tests/integration}/git_clone_wiki_test.go (94%) rename {integrations => tests/integration}/git_helper_for_declarative_test.go (98%) rename {integrations => tests/integration}/git_smart_http_test.go (98%) rename {integrations => tests/integration}/git_test.go (97%) rename {integrations => tests/integration}/goget_test.go (91%) rename {integrations => tests/integration}/gpg_git_test.go (94%) rename {integrations => tests/integration}/html_helper.go (98%) rename {integrations => tests/integration}/integration_test.go (58%) rename {integrations => tests/integration}/issue_test.go (97%) rename {integrations => tests/integration}/lfs_getobject_test.go (95%) rename {integrations => tests/integration}/lfs_local_endpoint_test.go (96%) rename {integrations => tests/integration}/links_test.go (96%) rename {integrations => tests/integration}/migrate_test.go (99%) rename {integrations => tests/integration}/migration-test/gitea-v1.6.4.mssql.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.6.4.mysql.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.6.4.postgres.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.6.4.sqlite3.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.7.0.mssql.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.7.0.mysql.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.7.0.postgres.sql.gz (100%) rename {integrations => tests/integration}/migration-test/gitea-v1.7.0.sqlite3.sql.gz (100%) rename {integrations => tests/integration}/migration-test/migration_test.go (90%) rename {integrations => tests/integration}/mirror_pull_test.go (97%) rename {integrations => tests/integration}/mirror_push_test.go (98%) rename {integrations => tests/integration}/nonascii_branches_test.go (98%) rename {integrations => tests/integration}/oauth_test.go (96%) rename {integrations => tests/integration}/org_count_test.go (99%) rename {integrations => tests/integration}/org_test.go (96%) rename {integrations => tests/integration}/private-testing.key (100%) rename {integrations => tests/integration}/privateactivity_test.go (93%) rename {integrations => tests/integration}/pull_compare_test.go (90%) rename {integrations => tests/integration}/pull_create_test.go (98%) rename {integrations => tests/integration}/pull_merge_test.go (99%) rename {integrations => tests/integration}/pull_review_test.go (84%) rename {integrations => tests/integration}/pull_status_test.go (99%) rename {integrations => tests/integration}/pull_update_test.go (99%) rename {integrations => tests/integration}/release_test.go (94%) rename {integrations => tests/integration}/rename_branch_test.go (98%) rename {integrations => tests/integration}/repo_activity_test.go (99%) rename {integrations => tests/integration}/repo_branch_test.go (98%) rename {integrations => tests/integration}/repo_commits_search_test.go (94%) rename {integrations => tests/integration}/repo_commits_test.go (97%) rename {integrations => tests/integration}/repo_fork_test.go (96%) rename {integrations => tests/integration}/repo_generate_test.go (95%) rename {integrations => tests/integration}/repo_migrate_test.go (94%) rename {integrations => tests/integration}/repo_search_test.go (96%) rename {integrations => tests/integration}/repo_tag_test.go (95%) rename {integrations => tests/integration}/repo_test.go (94%) rename {integrations => tests/integration}/repo_topic_test.go (94%) rename {integrations => tests/integration}/repo_watch_test.go (97%) rename {integrations => tests/integration}/repofiles_delete_test.go (99%) rename {integrations => tests/integration}/repofiles_update_test.go (99%) rename {integrations => tests/integration}/setting_test.go (95%) rename {integrations => tests/integration}/signin_test.go (95%) rename {integrations => tests/integration}/signout_test.go (87%) rename {integrations => tests/integration}/signup_test.go (94%) rename {integrations => tests/integration}/ssh_key_test.go (99%) rename {integrations => tests/integration}/timetracking_test.go (94%) rename {integrations => tests/integration}/user_avatar_test.go (98%) rename {integrations => tests/integration}/user_test.go (97%) rename {integrations => tests/integration}/version_test.go (87%) rename {integrations => tests/integration}/view_test.go (89%) rename {integrations => tests/integration}/webfinger_test.go (96%) rename {integrations => tests/integration}/xss_test.go (93%) rename {integrations => tests}/mssql.ini.tmpl (71%) rename {integrations => tests}/mysql.ini.tmpl (82%) rename {integrations => tests}/mysql8.ini.tmpl (71%) rename {integrations => tests}/pgsql.ini.tmpl (71%) rename {integrations => tests}/sqlite.ini.tmpl (68%) create mode 100644 tests/test_utils.go rename {integrations => tests}/testlogger.go (91%) diff --git a/.drone.yml b/.drone.yml index 57c888a7d985..93a471fae1db 100644 --- a/.drone.yml +++ b/.drone.yml @@ -498,6 +498,75 @@ steps: - name: deps path: /go +--- +kind: pipeline +type: docker +name: testing-e2e + +platform: + os: linux + arch: amd64 + +depends_on: + - compliance + +trigger: + event: + - pull_request + +volumes: + - name: deps + temp: {} + +services: + - name: pgsql + pull: default + image: postgres:10 + environment: + POSTGRES_DB: testgitea-e2e + POSTGRES_PASSWORD: postgres + POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8' + +steps: + - name: deps-frontend + image: node:16 + pull: always + commands: + - make deps-frontend + + - name: build-frontend + image: node:16 + commands: + - make frontend + depends_on: [deps-frontend] + + - name: deps-backend + image: golang:1.18 + pull: always + commands: + - make deps-backend + volumes: + - name: deps + path: /go + + # TODO: We should probably build all dependencies into a test image + - name: test-e2e + image: mcr.microsoft.com/playwright:v1.23.1-focal + commands: + - curl -sLO https://go.dev/dl/go1.18.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz + - groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea + - apt-get -qq update && apt-get -qqy install build-essential + - export TEST_PGSQL_SCHEMA='' + - ./build/test-env-prepare.sh + - su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql" + environment: + GOPROXY: https://goproxy.io + GOSUMDB: sum.golang.org + USE_REPO_TEST_DIR: 1 + TEST_PGSQL_DBNAME: 'testgitea-e2e' + DEBIAN_FRONTEND: noninteractive + depends_on: [build-frontend, deps-backend] + --- kind: pipeline name: update_translations diff --git a/.gitignore b/.gitignore index eab92b49ad18..0407dfbbd1dc 100644 --- a/.gitignore +++ b/.gitignore @@ -63,21 +63,14 @@ cpu.out /indexers /log /public/img/avatar -/integrations/gitea-integration-mysql -/integrations/gitea-integration-mysql8 -/integrations/gitea-integration-pgsql -/integrations/gitea-integration-sqlite -/integrations/gitea-integration-mssql -/integrations/indexers-mysql -/integrations/indexers-mysql8 -/integrations/indexers-pgsql -/integrations/indexers-sqlite -/integrations/indexers-mssql -/integrations/sqlite.ini -/integrations/mysql.ini -/integrations/mysql8.ini -/integrations/pgsql.ini -/integrations/mssql.ini +/tests/integration/gitea-integration-* +/tests/integration/indexers-* +/tests/e2e/gitea-e2e-* +/tests/e2e/indexers-* +/tests/e2e/reports +/tests/e2e/test-artifacts +/tests/e2e/test-snapshots +/tests/*.ini /node_modules /yarn.lock /yarn-error.log diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 61ab3de4b948..b13af805bcf5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -86,8 +86,10 @@ Here's how to run the test suite: | | | | :------------------------------------- | :----------------------------------------------- | |``make test[\#TestSpecificName]`` | run unit test | -|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for SQLite | -|[More details about integrations](integrations/README.md) | +|``make test-sqlite[\#TestSpecificName]``| run [integration](tests/integration) test for SQLite | +|[More details about integration tests](tests/integration/README.md) | +|``make test-e2e-sqlite[\#TestSpecificFileName]``| run [end-to-end](tests/e2e) test for SQLite | +|[More details about e2e tests](tests/e2e/README.md) | ## Vendoring @@ -168,7 +170,7 @@ import ( To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The Gitea code is divided into the following parts: -- **integration:** Integrations tests +- **integration:** Integration tests - **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging). - **models/fixtures:** Sample model data used in integration tests. - **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step. diff --git a/Makefile b/Makefile index 03b5bd505855..96d0b992ed8a 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64 -GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO) list ./... | grep -v /vendor/)) +GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/)) FOMANTIC_WORK_DIR := web_src/fomantic @@ -122,7 +122,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) -GO_DIRS := cmd integrations models modules routers build services tools +GO_DIRS := cmd tests models modules routers build services tools GO_SOURCES := $(wildcard *.go) GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go) @@ -131,6 +131,11 @@ ifeq ($(filter $(TAGS_SPLIT),bindata),bindata) GO_SOURCES += $(BINDATA_DEST) endif +# Force installation of playwright dependencies by setting this flag +ifdef DEPS_PLAYWRIGHT + PLAYWRIGHT_FLAGS += --with-deps +endif + SWAGGER_SPEC := templates/swagger/v1_json.tmpl SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g @@ -182,6 +187,7 @@ help: @echo " - test test everything" @echo " - test-frontend test frontend files" @echo " - test-backend test backend files" + @echo " - test-e2e[\#TestSpecificName] test end to end using playwright" @echo " - webpack build webpack files" @echo " - svg build svg files" @echo " - fomantic build fomantic files" @@ -236,9 +242,13 @@ clean: $(GO) clean -i ./... rm -rf $(EXECUTABLE) $(DIST) $(BINDATA_DEST) $(BINDATA_HASH) \ integrations*.test \ - integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \ - integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \ - integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini man/ + e2e*.test \ + tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \ + tests/integration/gitea-integration-mssql/ tests/integration/indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \ + tests/integration/indexers-mssql tests/mysql.ini tests/mysql8.ini tests/pgsql.ini tests/mssql.ini man/ \ + tests/e2e/gitea-e2e-pgsql/ tests/e2e/gitea-e2e-mysql/ tests/e2e/gitea-e2e-mysql8/ tests/e2e/gitea-e2e-sqlite/ \ + tests/e2e/gitea-e2e-mssql/ tests/e2e/indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql/ tests/e2e/indexers-sqlite/ \ + tests/e2e/indexers-mssql/ tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/ .PHONY: fmt fmt: @@ -318,7 +328,7 @@ lint: lint-frontend lint-backend .PHONY: lint-frontend lint-frontend: node_modules - npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js + npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e/*.test.e2e.js tests/e2e/utils_e2e.js npx stylelint --color --max-warnings=0 web_src/less npx spectral lint -q -F hint $(SWAGGER_SPEC) npx markdownlint docs *.md @@ -399,24 +409,26 @@ tidy-check: tidy generate-ini-sqlite: sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ - integrations/sqlite.ini.tmpl > integrations/sqlite.ini + -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ + -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ + tests/sqlite.ini.tmpl > tests/sqlite.ini .PHONY: test-sqlite test-sqlite: integrations.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test .PHONY: test-sqlite\#% test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*) .PHONY: test-sqlite-migration test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.sqlite.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test .PHONY: test-sqlite-migration\#% test-sqlite-migration\#%: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./migrations.individual.sqlite.test -test.run $(subst .,/,$*) generate-ini-mysql: @@ -425,20 +437,22 @@ generate-ini-mysql: -e 's|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \ -e 's|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \ -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ - integrations/mysql.ini.tmpl > integrations/mysql.ini + -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ + -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ + tests/mysql.ini.tmpl > tests/mysql.ini .PHONY: test-mysql test-mysql: integrations.mysql.test generate-ini-mysql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test .PHONY: test-mysql\#% test-mysql\#%: integrations.mysql.test generate-ini-mysql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*) .PHONY: test-mysql-migration test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.individual.mysql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.mysql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./migrations.individual.mysql.test generate-ini-mysql8: sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \ @@ -446,20 +460,22 @@ generate-ini-mysql8: -e 's|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \ -e 's|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \ -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ - integrations/mysql8.ini.tmpl > integrations/mysql8.ini + -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ + -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ + tests/mysql8.ini.tmpl > tests/mysql8.ini .PHONY: test-mysql8 test-mysql8: integrations.mysql8.test generate-ini-mysql8 - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test .PHONY: test-mysql8\#% test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8 - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*) .PHONY: test-mysql8-migration test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8 - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.individual.mysql8.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./migrations.individual.mysql8.test generate-ini-pgsql: sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \ @@ -468,20 +484,22 @@ generate-ini-pgsql: -e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \ -e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \ -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ - integrations/pgsql.ini.tmpl > integrations/pgsql.ini + -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ + -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ + tests/pgsql.ini.tmpl > tests/pgsql.ini .PHONY: test-pgsql test-pgsql: integrations.pgsql.test generate-ini-pgsql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test .PHONY: test-pgsql\#% test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*) .PHONY: test-pgsql-migration test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.pgsql.test - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.individual.pgsql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.pgsql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./migrations.individual.pgsql.test generate-ini-mssql: sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \ @@ -489,85 +507,140 @@ generate-ini-mssql: -e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \ -e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \ -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ - integrations/mssql.ini.tmpl > integrations/mssql.ini + -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ + -e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \ + tests/mssql.ini.tmpl > tests/mssql.ini .PHONY: test-mssql test-mssql: integrations.mssql.test generate-ini-mssql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test .PHONY: test-mssql\#% test-mssql\#%: integrations.mssql.test generate-ini-mssql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*) + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*) .PHONY: test-mssql-migration test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.mssql.test -test.failfast - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.individual.mssql.test -test.failfast + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.mssql.test -test.failfast + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./migrations.individual.mssql.test -test.failfast + +.PHONY: playwright +playwright: $(PLAYWRIGHT_DIR) + npm install --no-save @playwright/test + npx playwright install $(PLAYWRIGHT_FLAGS) + +.PHONY: test-e2e% +test-e2e%: TEST_TYPE ?= e2e + # Clear display env variable. Otherwise, chromium tests can fail. + DISPLAY= + +.PHONY: test-e2e +test-e2e: test-e2e-sqlite + +.PHONY: test-e2e-sqlite +test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test + +.PHONY: test-e2e-sqlite\#% +test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$* + +.PHONY: test-e2e-mysql +test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test + +.PHONY: test-e2e-mysql\#% +test-e2e-mysql\#%: playwright e2e.mysql.test generate-ini-mysql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$* + +.PHONY: test-e2e-mysql8 +test-e2e-mysql8: playwright e2e.mysql8.test generate-ini-mysql8 + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test + +.PHONY: test-e2e-mysql8\#% +test-e2e-mysql8\#%: playwright e2e.mysql8.test generate-ini-mysql8 + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run TestE2e/$* + +.PHONY: test-e2e-pgsql +test-e2e-pgsql: playwright e2e.pgsql.test generate-ini-pgsql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test + +.PHONY: test-e2e-pgsql\#% +test-e2e-pgsql\#%: playwright e2e.pgsql.test generate-ini-pgsql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$* + +.PHONY: test-e2e-mssql +test-e2e-mssql: playwright e2e.mssql.test generate-ini-mssql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test + +.PHONY: test-e2e-mssql\#% +test-e2e-mssql\#%: playwright e2e.mssql.test generate-ini-mssql + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$* .PHONY: bench-sqlite bench-sqlite: integrations.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . .PHONY: bench-mysql bench-mysql: integrations.mysql.test generate-ini-mysql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.mysql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . .PHONY: bench-mssql bench-mssql: integrations.mssql.test generate-ini-mssql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . .PHONY: bench-pgsql bench-pgsql: integrations.pgsql.test generate-ini-pgsql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./integrations.pgsql.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . .PHONY: integration-test-coverage integration-test-coverage: integrations.cover.test generate-ini-mysql - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out .PHONY: integration-test-coverage-sqlite integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sqlite - GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out integrations.mysql.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test integrations.mysql8.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mysql8.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql8.test integrations.pgsql.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.pgsql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test integrations.mssql.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.mssql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mssql.test integrations.sqlite.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags '$(TEST_TAGS)' + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)' integrations.cover.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test integrations.cover.sqlite.test: git-check $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)' + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)' .PHONY: migrations.mysql.test migrations.mysql.test: $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test .PHONY: migrations.mysql8.test migrations.mysql8.test: $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql8.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql8.test .PHONY: migrations.pgsql.test migrations.pgsql.test: $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.pgsql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test .PHONY: migrations.mssql.test migrations.mssql.test: $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.mssql.test + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mssql.test .PHONY: migrations.sqlite.test migrations.sqlite.test: $(GO_SOURCES) - $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)' + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)' .PHONY: migrations.individual.mysql.test migrations.individual.mysql.test: $(GO_SOURCES) @@ -589,6 +662,21 @@ migrations.individual.mssql.test: $(GO_SOURCES) migrations.individual.sqlite.test: $(GO_SOURCES) $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)' +e2e.mysql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test + +e2e.mysql8.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test + +e2e.pgsql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test + +e2e.mssql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mssql.test + +e2e.sqlite.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)' + .PHONY: check check: test diff --git a/build/code-batch-process.go b/build/code-batch-process.go index 0f8dbd40febd..24b13470ab45 100644 --- a/build/code-batch-process.go +++ b/build/code-batch-process.go @@ -61,7 +61,7 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error) "build", "cmd", "contrib", - "integrations", + "tests", "models", "modules", "routers", @@ -71,8 +71,8 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error) co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`)) co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`.*\bbindata\.go$`)) - co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`integrations/gitea-repositories-meta`)) - co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`integrations/migration-test`)) + co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`tests/gitea-repositories-meta`)) + co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`tests/integration/migration-test`)) co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`modules/git/tests`)) co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/fixtures`)) co.excludePatterns = append(co.excludePatterns, regexp.MustCompile(`models/migrations/fixtures`)) diff --git a/contrib/pr/checkout.go b/contrib/pr/checkout.go index 900b44d16769..85476afd0181 100644 --- a/contrib/pr/checkout.go +++ b/contrib/pr/checkout.go @@ -112,7 +112,7 @@ func runPR() { unittest.LoadFixtures() util.RemoveAll(setting.RepoRootPath) util.RemoveAll(repo_module.LocalCopyPath()) - unittest.CopyDir(path.Join(curDir, "integrations/gitea-repositories-meta"), setting.RepoRootPath) + unittest.CopyDir(path.Join(curDir, "tests/gitea-repositories-meta"), setting.RepoRootPath) log.Printf("[PR] Setting up router\n") // routers.GlobalInit() diff --git a/docs/content/doc/developers/guidelines-backend.md b/docs/content/doc/developers/guidelines-backend.md index 4280aa80fbd0..b680d73c82ae 100644 --- a/docs/content/doc/developers/guidelines-backend.md +++ b/docs/content/doc/developers/guidelines-backend.md @@ -33,7 +33,9 @@ To maintain understandable code and avoid circular dependencies it is important - `build`: Scripts to help build Gitea. - `cmd`: All Gitea actual sub commands includes web, doctor, serv, hooks, admin and etc. `web` will start the web service. `serv` and `hooks` will be invoked by Git or OpenSSH. Other sub commands could help to maintain Gitea. -- `integrations`: Integration tests +- `tests`: Common test utility functions + - `tests/integration`: Integration tests, to test back-end regressions + - `tests/e2e`: E2e tests, to test test front-end <> back-end compatibility and visual regressions. - `models`: Contains the data structures used by xorm to construct database tables. It also contains functions to query and update the database. Dependencies to other Gitea code should be avoided. You can make exceptions in cases such as logging. - `models/db`: Basic database operations. All other `models/xxx` packages should depend on this package. The `GetEngine` function should only be invoked from `models/`. - `models/fixtures`: Sample data used in unit tests and integration tests. One `yml` file means one table which will be loaded into database when beginning the tests. diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md index abefb1ca96b3..361ab530fa47 100644 --- a/docs/content/doc/developers/hacking-on-gitea.en-us.md +++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md @@ -309,7 +309,7 @@ will run the integration tests in an SQLite environment. Integration tests require `git lfs` to be installed. Other database tests are available but may need adjustment to the local environment. -Take a look at [`integrations/README.md`](https://github.com/go-gitea/gitea/blob/main/integrations/README.md) +Take a look at [`tests/integration/README.md`](https://github.com/go-gitea/gitea/blob/main/tests/integration/README.md) for more information and how to run a single test. ### Testing for a PR diff --git a/models/migrations/migrations_test.go b/models/migrations/migrations_test.go index 53e4f3539564..5cd70626b46c 100644 --- a/models/migrations/migrations_test.go +++ b/models/migrations/migrations_test.go @@ -46,7 +46,7 @@ func TestMain(m *testing.M) { giteaConf := os.Getenv("GITEA_CONF") if giteaConf == "" { - giteaConf = path.Join(filepath.Dir(setting.AppPath), "integrations/sqlite.ini") + giteaConf = path.Join(filepath.Dir(setting.AppPath), "tests/sqlite.ini") fmt.Printf("Environment variable $GITEA_CONF not set - defaulting to %s\n", giteaConf) } @@ -205,7 +205,7 @@ func prepareTestEnv(t *testing.T, skip int, syncModels ...interface{}) (*xorm.En ourSkip += skip deferFn := PrintCurrentTest(t, ourSkip) assert.NoError(t, os.RemoveAll(setting.RepoRootPath)) - assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath)) + assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath)) ownerDirs, err := os.ReadDir(setting.RepoRootPath) if err != nil { assert.NoError(t, err, "unable to read the new repo root: %v\n", err) diff --git a/models/migrations/testlogger_test.go b/models/migrations/testlogger_test.go index adbf19c0dbed..0455d9c9a6c5 100644 --- a/models/migrations/testlogger_test.go +++ b/models/migrations/testlogger_test.go @@ -188,5 +188,5 @@ func (log *TestLogger) GetName() string { func init() { log.Register("test", NewTestLogger) _, filename, _, _ := runtime.Caller(0) - prefix = strings.TrimSuffix(filename, "integrations/testlogger.go") + prefix = strings.TrimSuffix(filename, "tests/testlogger.go") } diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go index 58656f781f13..25129137f7da 100644 --- a/models/unittest/testdb.go +++ b/models/unittest/testdb.go @@ -116,7 +116,7 @@ func MainTest(m *testing.M, testOpts *TestOptions) { if err = util.RemoveAll(repoRootPath); err != nil { fatalTestError("util.RemoveAll: %v\n", err) } - if err = CopyDir(filepath.Join(testOpts.GiteaRootPath, "integrations", "gitea-repositories-meta"), setting.RepoRootPath); err != nil { + if err = CopyDir(filepath.Join(testOpts.GiteaRootPath, "tests", "gitea-repositories-meta"), setting.RepoRootPath); err != nil { fatalTestError("util.CopyDir: %v\n", err) } @@ -202,7 +202,7 @@ func PrepareTestDatabase() error { func PrepareTestEnv(t testing.TB) { assert.NoError(t, PrepareTestDatabase()) assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) - metaPath := filepath.Join(giteaRoot, "integrations", "gitea-repositories-meta") + metaPath := filepath.Join(giteaRoot, "tests", "gitea-repositories-meta") assert.NoError(t, CopyDir(metaPath, setting.RepoRootPath)) ownerDirs, err := os.ReadDir(setting.RepoRootPath) assert.NoError(t, err) diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index a7cf81250bf0..370bc218225a 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -24,7 +24,7 @@ import ( var localMetas = map[string]string{ "user": "gogits", "repo": "gogs", - "repoPath": "../../integrations/gitea-repositories-meta/user13/repo11.git/", + "repoPath": "../../tests/gitea-repositories-meta/user13/repo11.git/", } func TestMain(m *testing.M) { diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go index 732fe1a6beff..fdbc291c947d 100644 --- a/modules/markup/markdown/markdown_test.go +++ b/modules/markup/markdown/markdown_test.go @@ -29,7 +29,7 @@ const ( var localMetas = map[string]string{ "user": "gogits", "repo": "gogs", - "repoPath": "../../../integrations/gitea-repositories-meta/user13/repo11.git/", + "repoPath": "../../../tests/gitea-repositories-meta/user13/repo11.git/", } func TestMain(m *testing.M) { diff --git a/package-lock.json b/package-lock.json index 8142eea692dc..ef534bf87977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,6 +46,7 @@ "wrap-ansi": "8.0.1" }, "devDependencies": { + "@playwright/test": "1.25.1", "@stoplight/spectral-cli": "6.5.1", "eslint": "8.22.0", "eslint-plugin-import": "2.26.0", @@ -1356,6 +1357,22 @@ "node": ">= 8" } }, + "node_modules/@playwright/test": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.25.1.tgz", + "integrity": "sha512-IJ4X0yOakXtwkhbnNzKkaIgXe6df7u3H3FnuhI9Jqh+CdO0e/lYQlDLYiyI9cnXK8E7UAppAWP+VqAv6VX7HQg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "playwright-core": "1.25.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@popperjs/core": { "version": "2.11.6", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", @@ -9028,6 +9045,18 @@ "node": ">=8" } }, + "node_modules/playwright-core": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.1.tgz", + "integrity": "sha512-lSvPCmA2n7LawD2Hw7gSCLScZ+vYRkhU8xH0AapMyzwN+ojoDqhkH/KIEUxwNu2PjPoE/fcE0wLAksdOhJ2O5g==", + "dev": true, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -12789,6 +12818,16 @@ "fastq": "^1.6.0" } }, + "@playwright/test": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.25.1.tgz", + "integrity": "sha512-IJ4X0yOakXtwkhbnNzKkaIgXe6df7u3H3FnuhI9Jqh+CdO0e/lYQlDLYiyI9cnXK8E7UAppAWP+VqAv6VX7HQg==", + "dev": true, + "requires": { + "@types/node": "*", + "playwright-core": "1.25.1" + } + }, "@popperjs/core": { "version": "2.11.6", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", @@ -18627,6 +18666,12 @@ } } }, + "playwright-core": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.1.tgz", + "integrity": "sha512-lSvPCmA2n7LawD2Hw7gSCLScZ+vYRkhU8xH0AapMyzwN+ojoDqhkH/KIEUxwNu2PjPoE/fcE0wLAksdOhJ2O5g==", + "dev": true + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", diff --git a/package.json b/package.json index 3a5cb3f624a9..5a937ced955e 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "wrap-ansi": "8.0.1" }, "devDependencies": { + "@playwright/test": "1.25.1", "@stoplight/spectral-cli": "6.5.1", "eslint": "8.22.0", "eslint-plugin-import": "2.26.0", diff --git a/playwright.config.js b/playwright.config.js new file mode 100644 index 000000000000..af67717a2de9 --- /dev/null +++ b/playwright.config.js @@ -0,0 +1,100 @@ +// @ts-check +import {devices} from '@playwright/test'; + +const BASE_URL = process.env.GITEA_URL?.replace?.(/\/$/g, '') || 'http://localhost:3000'; + +/** + * @see https://playwright.dev/docs/test-configuration + * @type {import('@playwright/test').PlaywrightTestConfig} + */ +export default { + testDir: './tests/e2e/', + testMatch: /.*\.test\.e2e\.js/, // Match any .test.e2e.js files + + /* Maximum time one test can run for. */ + timeout: 30 * 1000, + + expect: { + + /** + * Maximum time expect() should wait for the condition to be met. + * For example in `await expect(locator).toHaveText();` + */ + timeout: 2000 + }, + + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: process.env.CI ? 'list' : [['list'], ['html', {outputFolder: 'tests/e2e/reports/', open: 'never'}]], + + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + headless: true, // set to false to debug + + locale: 'en-US', + + /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ + actionTimeout: 1000, + + /* Maximum time allowed for navigation, such as `page.goto()`. */ + navigationTimeout: 5 * 1000, + + /* Base URL to use in actions like `await page.goto('/')`. */ + baseURL: BASE_URL, + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + + screenshot: 'only-on-failure', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + + /* Project-specific settings. */ + use: { + ...devices['Desktop Chrome'], + }, + }, + + { + name: 'firefox', + use: { + ...devices['Desktop Firefox'], + }, + }, + + { + name: 'webkit', + use: { + ...devices['Desktop Safari'], + }, + }, + + /* Test against mobile viewports. */ + { + name: 'Mobile Chrome', + use: { + ...devices['Pixel 5'], + }, + }, + { + name: 'Mobile Safari', + use: { + ...devices['iPhone 12'], + }, + }, + ], + + /* Folder for test artifacts such as screenshots, videos, traces, etc. */ + outputDir: 'tests/e2e/test-artifacts/', + /* Folder for test artifacts such as screenshots, videos, traces, etc. */ + snapshotDir: 'tests/e2e/test-snapshots/', +}; diff --git a/tests/e2e/README.md b/tests/e2e/README.md new file mode 100644 index 000000000000..c84d7807fc0d --- /dev/null +++ b/tests/e2e/README.md @@ -0,0 +1,93 @@ +# End to end tests + +E2e tests largely follow the same syntax as [integration tests](tests/e2e/README.md). +Whereas integration tests are intended to mock and stress the back-end, server-side code, e2e tests the interface between front-end and back-end, as well as visual regressions with both assertions and visual comparisons. +They can be run with make commands for the appropriate backends, namely: +```shell +make test-sqlite +make test-pgsql +make test-mysql +make test-mysql8 +make test-mssql +``` + +Make sure to perform a clean front-end build before running tests: +``` +make clean frontend +``` + +## Install playwright system dependencies +``` +npx playwright install-deps +``` + + +## Run all tests via local drone +``` +drone exec --local --build-event "pull_request" +``` + +## Run sqlite e2e tests +Start tests +``` +make test-e2e-sqlite +``` + +## Run MySQL e2e tests +Setup a MySQL database inside docker +``` +docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -p 3306:3306 --rm --name mysql mysql:latest #(just ctrl-c to stop db and clean the container) +docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --rm --name elasticsearch elasticsearch:7.6.0 #(in a second terminal, just ctrl-c to stop db and clean the container) +``` +Start tests based on the database container +``` +TEST_MYSQL_HOST=localhost:3306 TEST_MYSQL_DBNAME=test TEST_MYSQL_USERNAME=root TEST_MYSQL_PASSWORD='' make test-e2e-mysql +``` + +## Run pgsql e2e tests +Setup a pgsql database inside docker +``` +docker run -e "POSTGRES_DB=test" -p 5432:5432 --rm --name pgsql postgres:latest #(just ctrl-c to stop db and clean the container) +``` +Start tests based on the database container +``` +TEST_PGSQL_HOST=localhost:5432 TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres make test-e2e-pgsql +``` + +## Run mssql e2e tests +Setup a mssql database inside docker +``` +docker run -e "ACCEPT_EULA=Y" -e "MSSQL_PID=Standard" -e "SA_PASSWORD=MwantsaSecurePassword1" -p 1433:1433 --rm --name mssql microsoft/mssql-server-linux:latest #(just ctrl-c to stop db and clean the container) +``` +Start tests based on the database container +``` +TEST_MSSQL_HOST=localhost:1433 TEST_MSSQL_DBNAME=gitea_test TEST_MSSQL_USERNAME=sa TEST_MSSQL_PASSWORD=MwantsaSecurePassword1 make test-e2e-mssql +``` + +## Running individual tests + +Example command to run `example.test.e2e.js` test file: + +_Note: unlike integration tests, this filtering is at the file level, not function_ + +For SQLite: + +``` +make test-e2e-sqlite#example +``` + +For other databases(replace `mssql` to `mysql`, `mysql8` or `pgsql`): + +``` +TEST_MSSQL_HOST=localhost:1433 TEST_MSSQL_DBNAME=test TEST_MSSQL_USERNAME=sa TEST_MSSQL_PASSWORD=MwantsaSecurePassword1 make test-e2e-mssql#example +``` + +## Visual testing + +Although the main goal of e2e is assertion testing, we have added a framework for visual regress testing. If you are working on front-end features, please use the following: + - Check out `main`, `make clean frontend`, and run e2e tests with `VISUAL_TEST=1` to generate outputs. This will initially fail, as no screenshots exist. You can run the e2e tests again to assert it passes. + - Check out your branch, `make clean frontend`, and run e2e tests with `VISUAL_TEST=1`. You should be able to assert you front-end changes don't break any other tests unintentionally. + +VISUAL_TEST=1 will create screenshots in tests/e2e/test-snapshots. The test will fail the first time this is enabled (until we get visual test image persistence figured out), because it will be testing against an empty screenshot folder. + +ACCEPT_VISUAL=1 will overwrite the snapshot images with new images. \ No newline at end of file diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go new file mode 100644 index 000000000000..c77c071181e3 --- /dev/null +++ b/tests/e2e/e2e_test.go @@ -0,0 +1,120 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +// This is primarily coped from /tests/integration/integration_test.go +// TODO: Move common functions to shared file + +package e2e + +import ( + "bytes" + "context" + "fmt" + "net/url" + "os" + "os/exec" + "path/filepath" + "testing" + + "code.gitea.io/gitea/models/unittest" + "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers" + "code.gitea.io/gitea/tests" +) + +var c *web.Route + +func TestMain(m *testing.M) { + defer log.Close() + + managerCtx, cancel := context.WithCancel(context.Background()) + graceful.InitManager(managerCtx) + defer cancel() + + tests.InitTest(false) + c = routers.NormalRoutes(context.TODO()) + + os.Unsetenv("GIT_AUTHOR_NAME") + os.Unsetenv("GIT_AUTHOR_EMAIL") + os.Unsetenv("GIT_AUTHOR_DATE") + os.Unsetenv("GIT_COMMITTER_NAME") + os.Unsetenv("GIT_COMMITTER_EMAIL") + os.Unsetenv("GIT_COMMITTER_DATE") + + err := unittest.InitFixtures( + unittest.FixturesOptions{ + Dir: filepath.Join(filepath.Dir(setting.AppPath), "models/fixtures/"), + }, + ) + if err != nil { + fmt.Printf("Error initializing test database: %v\n", err) + os.Exit(1) + } + + exitVal := m.Run() + + tests.WriterCloser.Reset() + + if err = util.RemoveAll(setting.Indexer.IssuePath); err != nil { + fmt.Printf("util.RemoveAll: %v\n", err) + os.Exit(1) + } + if err = util.RemoveAll(setting.Indexer.RepoPath); err != nil { + fmt.Printf("Unable to remove repo indexer: %v\n", err) + os.Exit(1) + } + + os.Exit(exitVal) +} + +// This should be the only test e2e necessary. It will collect all "*.test.e2e.js" +// files in this directory and build a test for each. +func TestE2e(t *testing.T) { + // Find the paths of all e2e test files in test test directory. + searchGlob := filepath.Join(filepath.Dir(setting.AppPath), "tests", "e2e", "*.test.e2e.js") + paths, err := filepath.Glob(searchGlob) + if err != nil { + t.Fatal(err) + } else if len(paths) == 0 { + t.Fatal(fmt.Errorf("No e2e tests found in %s", searchGlob)) + } + + runArgs := []string{"npx", "playwright", "test"} + + // To update snapshot outputs + if _, set := os.LookupEnv("ACCEPT_VISUAL"); set { + runArgs = append(runArgs, "--update-snapshots") + } + + // Create new test for each input file + for _, path := range paths { + _, filename := filepath.Split(path) + testname := filename[:len(filename)-len(filepath.Ext(path))] + + t.Run(testname, func(t *testing.T) { + // Default 2 minute timeout + onGiteaRun(t, func(*testing.T, *url.URL) { + cmd := exec.Command(runArgs[0], runArgs...) + cmd.Env = os.Environ() + cmd.Env = append(cmd.Env, fmt.Sprintf("GITEA_URL=%s", setting.AppURL)) + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + if err != nil { + // Currently colored output is conflicting. Using Printf until that is resolved. + fmt.Printf("%v", stdout.String()) + fmt.Printf("%v", stderr.String()) + log.Fatal("Playwright Failed: %s", err) + } else { + fmt.Printf("%v", stdout.String()) + } + }) + }) + } +} diff --git a/tests/e2e/example.test.e2e.js b/tests/e2e/example.test.e2e.js new file mode 100644 index 000000000000..bd19ceb8fc7c --- /dev/null +++ b/tests/e2e/example.test.e2e.js @@ -0,0 +1,57 @@ +// @ts-check +import {test, expect} from '@playwright/test'; +import {login_user, save_visual, load_logged_in_context} from './utils_e2e.js'; + +test.beforeAll(async ({browser}, workerInfo) => { + await login_user(browser, workerInfo, 'user2'); +}); + +test('Load Homepage', async ({page}) => { + const response = await page.goto('/'); + await expect(response?.status()).toBe(200); // Status OK + await expect(page).toHaveTitle(/^Gitea: Git with a cup of tea\s*$/); + await expect(page.locator('.logo')).toHaveAttribute('src', '/assets/img/logo.svg'); +}); + +test('Test Register Form', async ({page}, workerInfo) => { + const response = await page.goto('/user/sign_up'); + await expect(response?.status()).toBe(200); // Status OK + await page.type('input[name=user_name]', `e2e-test-${workerInfo.workerIndex}`); + await page.type('input[name=email]', `e2e-test-${workerInfo.workerIndex}@test.com`); + await page.type('input[name=password]', 'test123'); + await page.type('input[name=retype]', 'test123'); + await page.click('form button.ui.green.button:visible'); + // Make sure we routed to the home page. Else login failed. + await expect(page.url()).toBe(`${workerInfo.project.use.baseURL}/`); + await expect(page.locator('.dashboard-navbar span>img.ui.avatar.image')).toBeVisible(); + await expect(page.locator('.ui.positive.message.flash-success')).toHaveText('Account was successfully created.'); + + save_visual(page); +}); + +test('Test Login Form', async ({page}, workerInfo) => { + const response = await page.goto('/user/login'); + await expect(response?.status()).toBe(200); // Status OK + + await page.type('input[name=user_name]', `user2`); + await page.type('input[name=password]', `password`); + await page.click('form button.ui.green.button:visible'); + + await page.waitForLoadState('networkidle'); + + await expect(page.url()).toBe(`${workerInfo.project.use.baseURL}/`); + + save_visual(page); +}); + +test('Test Logged In User', async ({browser}, workerInfo) => { + const context = await load_logged_in_context(browser, workerInfo, 'user2'); + const page = await context.newPage(); + + await page.goto('/'); + + // Make sure we routed to the home page. Else login failed. + await expect(page.url()).toBe(`${workerInfo.project.use.baseURL}/`); + + save_visual(page); +}); diff --git a/tests/e2e/utils_e2e.js b/tests/e2e/utils_e2e.js new file mode 100644 index 000000000000..b5b9ce2751e6 --- /dev/null +++ b/tests/e2e/utils_e2e.js @@ -0,0 +1,60 @@ +import {expect} from '@playwright/test'; + +const ARTIFACTS_PATH = `tests/e2e/test-artifacts`; +const LOGIN_PASSWORD = 'password'; + +// log in user and store session info. This should generally be +// run in test.beforeAll(), then the session can be loaded in tests. +export async function login_user(browser, workerInfo, user) { + // Set up a new context + const context = await browser.newContext(); + const page = await context.newPage(); + + // Route to login page + // Note: this could probably be done more quickly with a POST + const response = await page.goto('/user/login'); + await expect(response?.status()).toBe(200); // Status OK + + // Fill out form + await page.type('input[name=user_name]', user); + await page.type('input[name=password]', LOGIN_PASSWORD); + await page.click('form button.ui.green.button:visible'); + + await page.waitForLoadState('networkidle'); + + await expect(page.url(), {message: `Failed to login user ${user}`}).toBe(`${workerInfo.project.use.baseURL}/`); + + // Save state + await context.storageState({path: `${ARTIFACTS_PATH}/state-${user}-${workerInfo.workerIndex}.json`}); + + return context; +} + +export async function load_logged_in_context(browser, workerInfo, user) { + let context; + try { + context = await browser.newContext({storageState: `${ARTIFACTS_PATH}/state-${user}-${workerInfo.workerIndex}.json`}); + } catch (err) { + if (err.code === 'ENOENT') { + throw new Error(`Could not find state for '${user}'. Did you call login_user(browser, workerInfo, '${user}') in test.beforeAll()?`); + } + } + return context; +} + +export async function save_visual(page) { + // Optionally include visual testing + if (process.env.VISUAL_TEST) { + await page.waitForLoadState('networkidle'); + // Mock page/version string + await page.locator('footer div.ui.left').evaluate((node) => node.innerHTML = 'MOCK'); + await expect(page).toHaveScreenshot({ + fullPage: true, + timeout: 20000, + mask: [ + page.locator('.dashboard-navbar span>img.ui.avatar.image'), + page.locator('.ui.dropdown.jump.item.tooltip span>img.ui.avatar.image'), + ], + }); + } +} diff --git a/tests/e2e/utils_e2e_test.go b/tests/e2e/utils_e2e_test.go new file mode 100644 index 000000000000..f8f3e94cda15 --- /dev/null +++ b/tests/e2e/utils_e2e_test.go @@ -0,0 +1,57 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package e2e + +import ( + "context" + "net" + "net/http" + "net/url" + "testing" + "time" + + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" + + "github.com/stretchr/testify/assert" +) + +func onGiteaRunTB(t testing.TB, callback func(testing.TB, *url.URL), prepare ...bool) { + if len(prepare) == 0 || prepare[0] { + defer tests.PrepareTestEnv(t, 1)() + } + s := http.Server{ + Handler: c, + } + + u, err := url.Parse(setting.AppURL) + assert.NoError(t, err) + listener, err := net.Listen("tcp", u.Host) + i := 0 + for err != nil && i <= 10 { + time.Sleep(100 * time.Millisecond) + listener, err = net.Listen("tcp", u.Host) + i++ + } + assert.NoError(t, err) + u.Host = listener.Addr().String() + + defer func() { + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) + s.Shutdown(ctx) + cancel() + }() + + go s.Serve(listener) + // Started by config go ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs) + + callback(t, u) +} + +func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) { + onGiteaRunTB(t, func(t testing.TB, u *url.URL) { + callback(t.(*testing.T), u) + }, prepare...) +} diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/HEAD diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/config diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/description b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/description similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/description rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/description diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/info/exclude b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/info/exclude rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/info/exclude diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/74/8bf557dfc9c6457998b5118a6c8b2129f56c30 diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/a5/46f86c7dd182592b96639045e176dde8df76ef diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/objects/b8/95782bd271fdd266dd06e5880ea4abdc3a0dc7 diff --git a/integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/private_repo_on_limited_org.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/HEAD diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/config diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/description b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/description similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/description rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/description diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/info/exclude b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/info/exclude rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/info/exclude diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/21/2f14c8b713de38bd0b3fb23bd288369b01668a diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/90/e402c3937a4639725fcc59ca1f529e7dc8506f diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/objects/ed/d9c1000cd1444efd63e153e3554c8d5656bf65 diff --git a/integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master b/tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master rename to tests/gitea-repositories-meta/limited_org/public_repo_on_limited_org.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/HEAD b/tests/gitea-repositories-meta/migration/lfs-test.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/HEAD rename to tests/gitea-repositories-meta/migration/lfs-test.git/HEAD diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/config b/tests/gitea-repositories-meta/migration/lfs-test.git/config similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/config rename to tests/gitea-repositories-meta/migration/lfs-test.git/config diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/description b/tests/gitea-repositories-meta/migration/lfs-test.git/description similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/description rename to tests/gitea-repositories-meta/migration/lfs-test.git/description diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout rename to tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit rename to tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge rename to tests/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push b/tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push rename to tests/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/index b/tests/gitea-repositories-meta/migration/lfs-test.git/index similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/index rename to tests/gitea-repositories-meta/migration/lfs-test.git/index diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 b/tests/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 rename to tests/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 b/tests/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 rename to tests/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 b/tests/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 rename to tests/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec b/tests/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec rename to tests/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed b/tests/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed rename to tests/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 b/tests/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 rename to tests/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 b/tests/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 rename to tests/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master b/tests/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master rename to tests/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMITMESSAGE diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/COMMIT_EDITMSG diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/config diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/config.backup diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/description b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/description similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/description rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/description diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/index similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/index diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/info/exclude b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/info/exclude rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/info/exclude diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/logs/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMITMESSAGE diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/COMMIT_EDITMSG diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/config.backup diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/description b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/description similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/description rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/description diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/index diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/info/exclude b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/info/exclude rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/info/exclude diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/logs/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_alpha.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMITMESSAGE diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/COMMIT_EDITMSG diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/config.backup diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/description b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/description similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/description rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/description diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/index diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/info/exclude b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/info/exclude rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/info/exclude diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/HEAD diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/logs/refs/heads/master diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/ba/ea7d6e6b7773a80bcede323cfb21dfe9d4b855 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/c2/a1ad4c931cebe27c7e39176fe7119b5557c9eb diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/objects/cd/aca8cf1d36e1e4e508a940f6e157e239beccfa diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/branch1 diff --git a/integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master b/tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master rename to tests/gitea-repositories-meta/org26/repo_external_tracker_numeric.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/HEAD diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/config diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/description b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/description similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/description rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/description diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/info/exclude b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/info/exclude rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/info/exclude diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/6e/75c9f89da9a9b93f4f36e61ed092f7a1625ba0 diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/7f/eb6f9dd600e17a04f48a76cfa0a56a3f30e2c1 diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/objects/b7/91b41c0ae8cb3c4b12f3fd8c3709c2481d9e37 diff --git a/integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master b/tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master rename to tests/gitea-repositories-meta/privated_org/private_repo_on_private_org.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/HEAD diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/config diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/description b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/description similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/description rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/description diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/info/exclude b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/info/exclude rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/info/exclude diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/04/f99c528b643b9175a4b156cdfc13aba6b43853 diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/86/de16d8658f5c0a17ec6aa313871295d7072f78 diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/objects/bf/19fd4707acb403c4aca44f126ab69142ac59ce diff --git a/integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master b/tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master rename to tests/gitea-repositories-meta/privated_org/public_repo_on_private_org.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/HEAD b/tests/gitea-repositories-meta/user12/repo10.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/HEAD rename to tests/gitea-repositories-meta/user12/repo10.git/HEAD diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/config b/tests/gitea-repositories-meta/user12/repo10.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/config rename to tests/gitea-repositories-meta/user12/repo10.git/config diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/description b/tests/gitea-repositories-meta/user12/repo10.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/description rename to tests/gitea-repositories-meta/user12/repo10.git/description diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/post-receive b/tests/gitea-repositories-meta/user12/repo10.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/post-receive rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user12/repo10.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive b/tests/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/update b/tests/gitea-repositories-meta/user12/repo10.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/update rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user12/repo10.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user12/repo10.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/info/exclude b/tests/gitea-repositories-meta/user12/repo10.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/info/exclude rename to tests/gitea-repositories-meta/user12/repo10.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/info/refs b/tests/gitea-repositories-meta/user12/repo10.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/info/refs rename to tests/gitea-repositories-meta/user12/repo10.git/info/refs diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/tests/gitea-repositories-meta/user12/repo10.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 rename to tests/gitea-repositories-meta/user12/repo10.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/tests/gitea-repositories-meta/user12/repo10.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f rename to tests/gitea-repositories-meta/user12/repo10.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/tests/gitea-repositories-meta/user12/repo10.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d rename to tests/gitea-repositories-meta/user12/repo10.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/objects/info/packs b/tests/gitea-repositories-meta/user12/repo10.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/objects/info/packs rename to tests/gitea-repositories-meta/user12/repo10.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/DefaultBranch b/tests/gitea-repositories-meta/user12/repo10.git/refs/heads/DefaultBranch similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/DefaultBranch rename to tests/gitea-repositories-meta/user12/repo10.git/refs/heads/DefaultBranch diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/develop b/tests/gitea-repositories-meta/user12/repo10.git/refs/heads/develop similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/develop rename to tests/gitea-repositories-meta/user12/repo10.git/refs/heads/develop diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/feature/1 b/tests/gitea-repositories-meta/user12/repo10.git/refs/heads/feature/1 similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/feature/1 rename to tests/gitea-repositories-meta/user12/repo10.git/refs/heads/feature/1 diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/master b/tests/gitea-repositories-meta/user12/repo10.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/refs/heads/master rename to tests/gitea-repositories-meta/user12/repo10.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user12/repo10.git/refs/tags/v1.1 b/tests/gitea-repositories-meta/user12/repo10.git/refs/tags/v1.1 similarity index 100% rename from integrations/gitea-repositories-meta/user12/repo10.git/refs/tags/v1.1 rename to tests/gitea-repositories-meta/user12/repo10.git/refs/tags/v1.1 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/HEAD b/tests/gitea-repositories-meta/user13/repo11.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/HEAD rename to tests/gitea-repositories-meta/user13/repo11.git/HEAD diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/config b/tests/gitea-repositories-meta/user13/repo11.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/config rename to tests/gitea-repositories-meta/user13/repo11.git/config diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/description b/tests/gitea-repositories-meta/user13/repo11.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/description rename to tests/gitea-repositories-meta/user13/repo11.git/description diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/post-receive b/tests/gitea-repositories-meta/user13/repo11.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/post-receive rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user13/repo11.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive b/tests/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/update b/tests/gitea-repositories-meta/user13/repo11.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/update rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user13/repo11.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user13/repo11.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/info/exclude b/tests/gitea-repositories-meta/user13/repo11.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/info/exclude rename to tests/gitea-repositories-meta/user13/repo11.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/info/refs b/tests/gitea-repositories-meta/user13/repo11.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/info/refs rename to tests/gitea-repositories-meta/user13/repo11.git/info/refs diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 b/tests/gitea-repositories-meta/user13/repo11.git/objects/0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 rename to tests/gitea-repositories-meta/user13/repo11.git/objects/0a/bcb056019adb8336cf9db3ad9d9cf80cd4b141 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/tests/gitea-repositories-meta/user13/repo11.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 rename to tests/gitea-repositories-meta/user13/repo11.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/tests/gitea-repositories-meta/user13/repo11.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f rename to tests/gitea-repositories-meta/user13/repo11.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/tests/gitea-repositories-meta/user13/repo11.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d rename to tests/gitea-repositories-meta/user13/repo11.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 b/tests/gitea-repositories-meta/user13/repo11.git/objects/75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 rename to tests/gitea-repositories-meta/user13/repo11.git/objects/75/d1afd00e111c8dbd9e3d96a27b431ac5ae6d74 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/ed/447543e0c85d628b91f7f466f4921908f4c5ea b/tests/gitea-repositories-meta/user13/repo11.git/objects/ed/447543e0c85d628b91f7f466f4921908f4c5ea similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/ed/447543e0c85d628b91f7f466f4921908f4c5ea rename to tests/gitea-repositories-meta/user13/repo11.git/objects/ed/447543e0c85d628b91f7f466f4921908f4c5ea diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/objects/info/packs b/tests/gitea-repositories-meta/user13/repo11.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/objects/info/packs rename to tests/gitea-repositories-meta/user13/repo11.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/DefaultBranch b/tests/gitea-repositories-meta/user13/repo11.git/refs/heads/DefaultBranch similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/DefaultBranch rename to tests/gitea-repositories-meta/user13/repo11.git/refs/heads/DefaultBranch diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/branch2 b/tests/gitea-repositories-meta/user13/repo11.git/refs/heads/branch2 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/branch2 rename to tests/gitea-repositories-meta/user13/repo11.git/refs/heads/branch2 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/develop b/tests/gitea-repositories-meta/user13/repo11.git/refs/heads/develop similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/develop rename to tests/gitea-repositories-meta/user13/repo11.git/refs/heads/develop diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/feature/1 b/tests/gitea-repositories-meta/user13/repo11.git/refs/heads/feature/1 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/feature/1 rename to tests/gitea-repositories-meta/user13/repo11.git/refs/heads/feature/1 diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/master b/tests/gitea-repositories-meta/user13/repo11.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/heads/master rename to tests/gitea-repositories-meta/user13/repo11.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user13/repo11.git/refs/tags/v1.1 b/tests/gitea-repositories-meta/user13/repo11.git/refs/tags/v1.1 similarity index 100% rename from integrations/gitea-repositories-meta/user13/repo11.git/refs/tags/v1.1 rename to tests/gitea-repositories-meta/user13/repo11.git/refs/tags/v1.1 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/HEAD b/tests/gitea-repositories-meta/user2/commits_search_test.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/HEAD rename to tests/gitea-repositories-meta/user2/commits_search_test.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/config b/tests/gitea-repositories-meta/user2/commits_search_test.git/config similarity index 53% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/config rename to tests/gitea-repositories-meta/user2/commits_search_test.git/config index 9ec7812f9113..bfbada5989c8 100644 --- a/integrations/gitea-repositories-meta/user2/commits_search_test.git/config +++ b/tests/gitea-repositories-meta/user2/commits_search_test.git/config @@ -3,6 +3,6 @@ filemode = true bare = true [remote "origin"] - url = /home/mura/go/src/code.gitea.io/gitea/integrations/gitea-repositories-meta/user2/commits_search_test/ + url = /home/mura/go/src/code.gitea.io/gitea/tests/gitea-repositories-meta/user2/commits_search_test/ fetch = +refs/*:refs/* mirror = true diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/description b/tests/gitea-repositories-meta/user2/commits_search_test.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/description rename to tests/gitea-repositories-meta/user2/commits_search_test.git/description diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/info/exclude b/tests/gitea-repositories-meta/user2/commits_search_test.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/info/exclude rename to tests/gitea-repositories-meta/user2/commits_search_test.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/0a/8499a22ad32a80beda9d75efe15f9f94582468 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/0a/8499a22ad32a80beda9d75efe15f9f94582468 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/0a/8499a22ad32a80beda9d75efe15f9f94582468 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/0a/8499a22ad32a80beda9d75efe15f9f94582468 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/0c/cf1fcd4d1717c22de0707619a5577ea0acebf0 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/3e/a192a6466793d4b7cd8641801ca0c6bec3979c b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/3e/a192a6466793d4b7cd8641801ca0c6bec3979c similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/3e/a192a6466793d4b7cd8641801ca0c6bec3979c rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/3e/a192a6466793d4b7cd8641801ca0c6bec3979c diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/3f/6594f108842b7c50772510e53ce113d3583c4a b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/3f/6594f108842b7c50772510e53ce113d3583c4a similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/3f/6594f108842b7c50772510e53ce113d3583c4a rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/3f/6594f108842b7c50772510e53ce113d3583c4a diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/58/e97d1a24fb9e1599d8a467ec409430f3d3569e b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/58/e97d1a24fb9e1599d8a467ec409430f3d3569e similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/58/e97d1a24fb9e1599d8a467ec409430f3d3569e rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/58/e97d1a24fb9e1599d8a467ec409430f3d3569e diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/67/68c1fc1d9448422f05cc84267d94ee62085fe8 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/67/68c1fc1d9448422f05cc84267d94ee62085fe8 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/67/68c1fc1d9448422f05cc84267d94ee62085fe8 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/67/68c1fc1d9448422f05cc84267d94ee62085fe8 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/6e/8eabd9a7f8d6acd2a1219facfd37415564b144 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/6e/8eabd9a7f8d6acd2a1219facfd37415564b144 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/6e/8eabd9a7f8d6acd2a1219facfd37415564b144 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/6e/8eabd9a7f8d6acd2a1219facfd37415564b144 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/85/f46d747a68adf79cc01e2c25ba6a56932d298d b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/85/f46d747a68adf79cc01e2c25ba6a56932d298d similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/85/f46d747a68adf79cc01e2c25ba6a56932d298d rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/85/f46d747a68adf79cc01e2c25ba6a56932d298d diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/8d/dd8d1ad1fdc21ab629e906711fa9bc27aa1c52 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/95/fd0c4138480e4b3913e7cf71a90623fb926fe8 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/95/fd0c4138480e4b3913e7cf71a90623fb926fe8 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/95/fd0c4138480e4b3913e7cf71a90623fb926fe8 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/95/fd0c4138480e4b3913e7cf71a90623fb926fe8 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/98/00fe78cabf4fe774fcf376f97fa2a0ed06987b b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/98/00fe78cabf4fe774fcf376f97fa2a0ed06987b similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/98/00fe78cabf4fe774fcf376f97fa2a0ed06987b rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/98/00fe78cabf4fe774fcf376f97fa2a0ed06987b diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/9f/cdb7d53bdef786d2e5577948a0c0d4b321fe5a diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/c2/0caf78b5f9dd2d0d183876c5cd0e761c13f7f8 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/c5/2ba74685f5c8c593efbbb38f62fe024110adef b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/c5/2ba74685f5c8c593efbbb38f62fe024110adef similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/c5/2ba74685f5c8c593efbbb38f62fe024110adef rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/c5/2ba74685f5c8c593efbbb38f62fe024110adef diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/d6/ae8023a10ff446b6a4e7f441554834008e99c3 b/tests/gitea-repositories-meta/user2/commits_search_test.git/objects/d6/ae8023a10ff446b6a4e7f441554834008e99c3 similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/objects/d6/ae8023a10ff446b6a4e7f441554834008e99c3 rename to tests/gitea-repositories-meta/user2/commits_search_test.git/objects/d6/ae8023a10ff446b6a4e7f441554834008e99c3 diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/packed-refs b/tests/gitea-repositories-meta/user2/commits_search_test.git/packed-refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/packed-refs rename to tests/gitea-repositories-meta/user2/commits_search_test.git/packed-refs diff --git a/integrations/gitea-repositories-meta/user2/commits_search_test.git/refs/heads/master b/tests/gitea-repositories-meta/user2/commits_search_test.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/commits_search_test.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/commits_search_test.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/HEAD b/tests/gitea-repositories-meta/user2/git_hooks_test.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/HEAD rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/config b/tests/gitea-repositories-meta/user2/git_hooks_test.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/config rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/config diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/description b/tests/gitea-repositories-meta/user2/git_hooks_test.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/description rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/description diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/pre-receive b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/pre-receive rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/pre-receive.d/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/info/exclude b/tests/gitea-repositories-meta/user2/git_hooks_test.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/info/exclude rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/info/refs b/tests/gitea-repositories-meta/user2/git_hooks_test.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/info/refs rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/info/refs diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/info/packs b/tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/objects/info/packs rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/DefaultBranch b/tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/DefaultBranch similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/DefaultBranch rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/DefaultBranch diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/develop b/tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/develop similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/develop rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/develop diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/feature/1 b/tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/feature/1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/feature/1 rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/feature/1 diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/master b/tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/tags/v1.1 b/tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/tags/v1.1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/git_hooks_test.git/refs/tags/v1.1 rename to tests/gitea-repositories-meta/user2/git_hooks_test.git/refs/tags/v1.1 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/HEAD b/tests/gitea-repositories-meta/user2/glob.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/HEAD rename to tests/gitea-repositories-meta/user2/glob.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/glob.git/config b/tests/gitea-repositories-meta/user2/glob.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/config rename to tests/gitea-repositories-meta/user2/glob.git/config diff --git a/integrations/gitea-repositories-meta/user2/glob.git/description b/tests/gitea-repositories-meta/user2/glob.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/description rename to tests/gitea-repositories-meta/user2/glob.git/description diff --git a/integrations/gitea-repositories-meta/user2/glob.git/info/exclude b/tests/gitea-repositories-meta/user2/glob.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/info/exclude rename to tests/gitea-repositories-meta/user2/glob.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/48/06cb9df135782b818c968c2fadbd2c150d23d6 b/tests/gitea-repositories-meta/user2/glob.git/objects/48/06cb9df135782b818c968c2fadbd2c150d23d6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/48/06cb9df135782b818c968c2fadbd2c150d23d6 rename to tests/gitea-repositories-meta/user2/glob.git/objects/48/06cb9df135782b818c968c2fadbd2c150d23d6 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 b/tests/gitea-repositories-meta/user2/glob.git/objects/59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 rename to tests/gitea-repositories-meta/user2/glob.git/objects/59/fee614e09d1f1cd1e15e4b2a7e9c8873a81498 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 b/tests/gitea-repositories-meta/user2/glob.git/objects/7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 rename to tests/gitea-repositories-meta/user2/glob.git/objects/7c/8ac2f8d82a1eb5f6aaece6629ff11015f91eb4 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/8e/592e636d27ac144f92f7fe8c33631cbdea594d b/tests/gitea-repositories-meta/user2/glob.git/objects/8e/592e636d27ac144f92f7fe8c33631cbdea594d similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/8e/592e636d27ac144f92f7fe8c33631cbdea594d rename to tests/gitea-repositories-meta/user2/glob.git/objects/8e/592e636d27ac144f92f7fe8c33631cbdea594d diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/95/aff026f99a9ab76fbd01decb63dd3dbc03e498 b/tests/gitea-repositories-meta/user2/glob.git/objects/95/aff026f99a9ab76fbd01decb63dd3dbc03e498 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/95/aff026f99a9ab76fbd01decb63dd3dbc03e498 rename to tests/gitea-repositories-meta/user2/glob.git/objects/95/aff026f99a9ab76fbd01decb63dd3dbc03e498 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/ae/d1ffed24cc3cf9b80490795e893cae4bddd684 b/tests/gitea-repositories-meta/user2/glob.git/objects/ae/d1ffed24cc3cf9b80490795e893cae4bddd684 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/ae/d1ffed24cc3cf9b80490795e893cae4bddd684 rename to tests/gitea-repositories-meta/user2/glob.git/objects/ae/d1ffed24cc3cf9b80490795e893cae4bddd684 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/bf/d6a6583f9a9ac59bd726c1df26c64a89427ede b/tests/gitea-repositories-meta/user2/glob.git/objects/bf/d6a6583f9a9ac59bd726c1df26c64a89427ede similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/bf/d6a6583f9a9ac59bd726c1df26c64a89427ede rename to tests/gitea-repositories-meta/user2/glob.git/objects/bf/d6a6583f9a9ac59bd726c1df26c64a89427ede diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a b/tests/gitea-repositories-meta/user2/glob.git/objects/c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a rename to tests/gitea-repositories-meta/user2/glob.git/objects/c8/eb3b6c767ccb68411d0a1f6c769be69fb4d95a diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 b/tests/gitea-repositories-meta/user2/glob.git/objects/de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 rename to tests/gitea-repositories-meta/user2/glob.git/objects/de/6be43fe8eb19ca3f4e934cb8b9a9a0b20fe865 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/objects/ef/6b814b610d8e7717aa0f71fbe5842bcf814697 b/tests/gitea-repositories-meta/user2/glob.git/objects/ef/6b814b610d8e7717aa0f71fbe5842bcf814697 similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/objects/ef/6b814b610d8e7717aa0f71fbe5842bcf814697 rename to tests/gitea-repositories-meta/user2/glob.git/objects/ef/6b814b610d8e7717aa0f71fbe5842bcf814697 diff --git a/integrations/gitea-repositories-meta/user2/glob.git/refs/heads/master b/tests/gitea-repositories-meta/user2/glob.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/glob.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/glob.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/HEAD b/tests/gitea-repositories-meta/user2/repo1.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/HEAD rename to tests/gitea-repositories-meta/user2/repo1.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/config b/tests/gitea-repositories-meta/user2/repo1.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/config rename to tests/gitea-repositories-meta/user2/repo1.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/description b/tests/gitea-repositories-meta/user2/repo1.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/description rename to tests/gitea-repositories-meta/user2/repo1.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo1.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update b/tests/gitea-repositories-meta/user2/repo1.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/update rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user2/repo1.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/info/exclude b/tests/gitea-repositories-meta/user2/repo1.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo1.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/info/refs b/tests/gitea-repositories-meta/user2/repo1.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/info/refs rename to tests/gitea-repositories-meta/user2/repo1.git/info/refs diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/00/750edc07d6415dcc07ae0351e9397b0222b7ba b/tests/gitea-repositories-meta/user2/repo1.git/objects/00/750edc07d6415dcc07ae0351e9397b0222b7ba similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/00/750edc07d6415dcc07ae0351e9397b0222b7ba rename to tests/gitea-repositories-meta/user2/repo1.git/objects/00/750edc07d6415dcc07ae0351e9397b0222b7ba diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 b/tests/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/2a/2f1d4670728a2e10049e345bd7a276468beab6 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 b/tests/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/4a/357436d925b5c974181ff12a994538ddc5a269 b/tests/gitea-repositories-meta/user2/repo1.git/objects/4a/357436d925b5c974181ff12a994538ddc5a269 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/4a/357436d925b5c974181ff12a994538ddc5a269 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/4a/357436d925b5c974181ff12a994538ddc5a269 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f b/tests/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f rename to tests/gitea-repositories-meta/user2/repo1.git/objects/4b/4851ad51df6a7d9f25c979345979eaeb5b349f diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 b/tests/gitea-repositories-meta/user2/repo1.git/objects/5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/5c/050d3b6d2db231ab1f64e324f1b6b9a0b181c2 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd b/tests/gitea-repositories-meta/user2/repo1.git/objects/5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd rename to tests/gitea-repositories-meta/user2/repo1.git/objects/5f/22f7d0d95d614d25a5b68592adb345a4b5c7fd diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/62/fb502a7172d4453f0322a2cc85bddffa57f07a b/tests/gitea-repositories-meta/user2/repo1.git/objects/62/fb502a7172d4453f0322a2cc85bddffa57f07a similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/62/fb502a7172d4453f0322a2cc85bddffa57f07a rename to tests/gitea-repositories-meta/user2/repo1.git/objects/62/fb502a7172d4453f0322a2cc85bddffa57f07a diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d b/tests/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d rename to tests/gitea-repositories-meta/user2/repo1.git/objects/65/f1bf27bc3bf70f64657658635e66094edbcb4d diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb b/tests/gitea-repositories-meta/user2/repo1.git/objects/6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb rename to tests/gitea-repositories-meta/user2/repo1.git/objects/6a/a3a5385611c5eb8986c9961a9c34a93cbaadfb diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/7c/4df115542e05c700f297519e906fd63c9c9804 b/tests/gitea-repositories-meta/user2/repo1.git/objects/7c/4df115542e05c700f297519e906fd63c9c9804 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/7c/4df115542e05c700f297519e906fd63c9c9804 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/7c/4df115542e05c700f297519e906fd63c9c9804 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 b/tests/gitea-repositories-meta/user2/repo1.git/objects/90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/90/dcd07da077d1e7cd6032b52d1f79ae2b5f19b2 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/94/922e1295c678267de1193b7b84ad8a086c27f9 b/tests/gitea-repositories-meta/user2/repo1.git/objects/94/922e1295c678267de1193b7b84ad8a086c27f9 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/94/922e1295c678267de1193b7b84ad8a086c27f9 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/94/922e1295c678267de1193b7b84ad8a086c27f9 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/98/5f0301dba5e7b34be866819cd15ad3d8f508ee b/tests/gitea-repositories-meta/user2/repo1.git/objects/98/5f0301dba5e7b34be866819cd15ad3d8f508ee similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/98/5f0301dba5e7b34be866819cd15ad3d8f508ee rename to tests/gitea-repositories-meta/user2/repo1.git/objects/98/5f0301dba5e7b34be866819cd15ad3d8f508ee diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a b/tests/gitea-repositories-meta/user2/repo1.git/objects/a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a rename to tests/gitea-repositories-meta/user2/repo1.git/objects/a6/9277c81e90b98a7c0ab25b042a6e296da8eb9a diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d b/tests/gitea-repositories-meta/user2/repo1.git/objects/a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d rename to tests/gitea-repositories-meta/user2/repo1.git/objects/a7/57c0ea621e63d0fd6fc353a175fdc7199e5d1d diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/b2/60587271671842af0b036e4fe643c9d45b7ddd b/tests/gitea-repositories-meta/user2/repo1.git/objects/b2/60587271671842af0b036e4fe643c9d45b7ddd similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/b2/60587271671842af0b036e4fe643c9d45b7ddd rename to tests/gitea-repositories-meta/user2/repo1.git/objects/b2/60587271671842af0b036e4fe643c9d45b7ddd diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 b/tests/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 b/tests/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/dc/7a8ba127fee870dd683310ce660dfe59333a1b b/tests/gitea-repositories-meta/user2/repo1.git/objects/dc/7a8ba127fee870dd683310ce660dfe59333a1b similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/dc/7a8ba127fee870dd683310ce660dfe59333a1b rename to tests/gitea-repositories-meta/user2/repo1.git/objects/dc/7a8ba127fee870dd683310ce660dfe59333a1b diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/dd/59742c0f6672911f2b64cba5711ac00593ed32 b/tests/gitea-repositories-meta/user2/repo1.git/objects/dd/59742c0f6672911f2b64cba5711ac00593ed32 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/dd/59742c0f6672911f2b64cba5711ac00593ed32 rename to tests/gitea-repositories-meta/user2/repo1.git/objects/dd/59742c0f6672911f2b64cba5711ac00593ed32 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs b/tests/gitea-repositories-meta/user2/repo1.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/objects/info/packs rename to tests/gitea-repositories-meta/user2/repo1.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/DefaultBranch diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/branch2 b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/branch2 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/branch2 rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/branch2 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/develop similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/develop rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/develop diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/feature/1 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/pr-to-update b/tests/gitea-repositories-meta/user2/repo1.git/refs/heads/pr-to-update similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/heads/pr-to-update rename to tests/gitea-repositories-meta/user2/repo1.git/refs/heads/pr-to-update diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/notes/commits b/tests/gitea-repositories-meta/user2/repo1.git/refs/notes/commits similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/notes/commits rename to tests/gitea-repositories-meta/user2/repo1.git/refs/notes/commits diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/2/head b/tests/gitea-repositories-meta/user2/repo1.git/refs/pull/2/head similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/2/head rename to tests/gitea-repositories-meta/user2/repo1.git/refs/pull/2/head diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/3/head b/tests/gitea-repositories-meta/user2/repo1.git/refs/pull/3/head similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/3/head rename to tests/gitea-repositories-meta/user2/repo1.git/refs/pull/3/head diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/5/head b/tests/gitea-repositories-meta/user2/repo1.git/refs/pull/5/head similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/pull/5/head rename to tests/gitea-repositories-meta/user2/repo1.git/refs/pull/5/head diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/tags/v1.1 b/tests/gitea-repositories-meta/user2/repo1.git/refs/tags/v1.1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.git/refs/tags/v1.1 rename to tests/gitea-repositories-meta/user2/repo1.git/refs/tags/v1.1 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/HEAD b/tests/gitea-repositories-meta/user2/repo1.wiki.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/HEAD rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/config b/tests/gitea-repositories-meta/user2/repo1.wiki.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/config rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/description b/tests/gitea-repositories-meta/user2/repo1.wiki.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/description rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/info/exclude b/tests/gitea-repositories-meta/user2/repo1.wiki.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/2c/54faec6c45d31c1abfaecdab471eac6633738a b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/2c/54faec6c45d31c1abfaecdab471eac6633738a similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/2c/54faec6c45d31c1abfaecdab471eac6633738a rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/2c/54faec6c45d31c1abfaecdab471eac6633738a diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/e5/3d079e581fbfdea1075a54d5b621eab0090e52 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/e5/3d079e581fbfdea1075a54d5b621eab0090e52 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/e5/3d079e581fbfdea1075a54d5b621eab0090e52 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/e5/3d079e581fbfdea1075a54d5b621eab0090e52 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/ea/82fc8777a24b07c26b3a4bf4e2742c03733eab b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/ea/82fc8777a24b07c26b3a4bf4e2742c03733eab similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/ea/82fc8777a24b07c26b3a4bf4e2742c03733eab rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/ea/82fc8777a24b07c26b3a4bf4e2742c03733eab diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 b/tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master b/tests/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/HEAD b/tests/gitea-repositories-meta/user2/repo15.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/HEAD rename to tests/gitea-repositories-meta/user2/repo15.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/config b/tests/gitea-repositories-meta/user2/repo15.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/config rename to tests/gitea-repositories-meta/user2/repo15.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/description b/tests/gitea-repositories-meta/user2/repo15.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/description rename to tests/gitea-repositories-meta/user2/repo15.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo15.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update b/tests/gitea-repositories-meta/user2/repo15.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/update rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user2/repo15.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo15.git/info/exclude b/tests/gitea-repositories-meta/user2/repo15.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo15.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo15.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/HEAD b/tests/gitea-repositories-meta/user2/repo16.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/HEAD rename to tests/gitea-repositories-meta/user2/repo16.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/config b/tests/gitea-repositories-meta/user2/repo16.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/config rename to tests/gitea-repositories-meta/user2/repo16.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/description b/tests/gitea-repositories-meta/user2/repo16.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/description rename to tests/gitea-repositories-meta/user2/repo16.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/info/exclude b/tests/gitea-repositories-meta/user2/repo16.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo16.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 b/tests/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/0c/3d59dea27b97aa3cb66072745d7a2c51a7a8b1 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c b/tests/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c rename to tests/gitea-repositories-meta/user2/repo16.git/objects/24/f83a471f77579fea57bac7255d6e64e70fce1c diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 b/tests/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/27/566bd5738fc8b4e3fef3c5e72cce608537bd95 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f b/tests/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f rename to tests/gitea-repositories-meta/user2/repo16.git/objects/3b/2b54fe3d9a8279d5b926124dccdf279b8eff2f diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de b/tests/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de rename to tests/gitea-repositories-meta/user2/repo16.git/objects/45/8121ce9a6b855c9733bae62093caf3f39685de diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 b/tests/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/50/99b81332712fe655e34e8dd63574f503f61811 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 b/tests/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/69/554a64c1e6030f051e5c3f94bfbd773cd6a324 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 b/tests/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/a4/3476a501516e065c5a82f05fd58fd319598bc1 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac b/tests/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac rename to tests/gitea-repositories-meta/user2/repo16.git/objects/e9/4083fcdf1f10c545e9253a23c5e44a2ff68aac diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 b/tests/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/f2/7c2b2b03dcab38beaf89b0ab4ff61f6de63441 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 b/tests/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 rename to tests/gitea-repositories-meta/user2/repo16.git/objects/f9/0451c72ef61a7645293d17b47be7a8e983da57 diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign b/tests/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign rename to tests/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated b/tests/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated rename to tests/gitea-repositories-meta/user2/repo16.git/refs/heads/good-sign-not-yet-validated diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master b/tests/gitea-repositories-meta/user2/repo16.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/repo16.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed b/tests/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed rename to tests/gitea-repositories-meta/user2/repo16.git/refs/heads/not-signed diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/HEAD b/tests/gitea-repositories-meta/user2/repo2.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/HEAD rename to tests/gitea-repositories-meta/user2/repo2.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/config b/tests/gitea-repositories-meta/user2/repo2.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/config rename to tests/gitea-repositories-meta/user2/repo2.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/description b/tests/gitea-repositories-meta/user2/repo2.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/description rename to tests/gitea-repositories-meta/user2/repo2.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/info/exclude b/tests/gitea-repositories-meta/user2/repo2.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo2.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/info/refs b/tests/gitea-repositories-meta/user2/repo2.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/info/refs rename to tests/gitea-repositories-meta/user2/repo2.git/info/refs diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/0a/7d8b41ae9763e9a1743917396839d1791d49d0 b/tests/gitea-repositories-meta/user2/repo2.git/objects/0a/7d8b41ae9763e9a1743917396839d1791d49d0 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/0a/7d8b41ae9763e9a1743917396839d1791d49d0 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/0a/7d8b41ae9763e9a1743917396839d1791d49d0 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 b/tests/gitea-repositories-meta/user2/repo2.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/0c/f15c3f66ec8384480ed9c3cf87c9e97fbb0ec3 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 b/tests/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/1c/887eaa8d81fa86da7695d8f635cf17813eb422 b/tests/gitea-repositories-meta/user2/repo2.git/objects/1c/887eaa8d81fa86da7695d8f635cf17813eb422 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/1c/887eaa8d81fa86da7695d8f635cf17813eb422 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/1c/887eaa8d81fa86da7695d8f635cf17813eb422 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d b/tests/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d rename to tests/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 b/tests/gitea-repositories-meta/user2/repo2.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/32/5dc4f8e9344e6668f21536a69d5f1d4ed53ca3 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/36/fff01c8c9f722d49d53186abd27b5be8d85338 b/tests/gitea-repositories-meta/user2/repo2.git/objects/36/fff01c8c9f722d49d53186abd27b5be8d85338 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/36/fff01c8c9f722d49d53186abd27b5be8d85338 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/36/fff01c8c9f722d49d53186abd27b5be8d85338 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 b/tests/gitea-repositories-meta/user2/repo2.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/42/3313fbd38093bb10d0c8387db9105409c6f196 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc b/tests/gitea-repositories-meta/user2/repo2.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc rename to tests/gitea-repositories-meta/user2/repo2.git/objects/71/911bf48766c7181518c1070911019fbb00b1fc diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 b/tests/gitea-repositories-meta/user2/repo2.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/72/fc6251cc648e914c10009d31431fa2e38b9a20 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e b/tests/gitea-repositories-meta/user2/repo2.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e rename to tests/gitea-repositories-meta/user2/repo2.git/objects/74/d5a0d73db9b9ef7aa9978eb7a099b08f54d45e diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 b/tests/gitea-repositories-meta/user2/repo2.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/7c/d7c8fa852973c72c66eb120a6677c54a8697f7 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec b/tests/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec rename to tests/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 b/tests/gitea-repositories-meta/user2/repo2.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/c1/0d10b7e655b3dab1f53176db57c8219a5488d6 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 b/tests/gitea-repositories-meta/user2/repo2.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/c4/b38c3e1395393f75bbbc2ed10c7eeb577d3b64 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 b/tests/gitea-repositories-meta/user2/repo2.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 rename to tests/gitea-repositories-meta/user2/repo2.git/objects/f5/05ec9b5c7a45a10259c1dda7f18434e5d55940 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/info/commit-graph b/tests/gitea-repositories-meta/user2/repo2.git/objects/info/commit-graph similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/info/commit-graph rename to tests/gitea-repositories-meta/user2/repo2.git/objects/info/commit-graph diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/info/packs b/tests/gitea-repositories-meta/user2/repo2.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/info/packs rename to tests/gitea-repositories-meta/user2/repo2.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap b/tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap rename to tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.bitmap diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx b/tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx rename to tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.idx diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack b/tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack rename to tests/gitea-repositories-meta/user2/repo2.git/objects/pack/pack-a2f7ad943b3d857eb3ebdb4b35eeef38f63cf5d2.pack diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/packed-refs b/tests/gitea-repositories-meta/user2/repo2.git/packed-refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/packed-refs rename to tests/gitea-repositories-meta/user2/repo2.git/packed-refs diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master b/tests/gitea-repositories-meta/user2/repo2.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/repo2.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/HEAD b/tests/gitea-repositories-meta/user2/repo20.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/HEAD rename to tests/gitea-repositories-meta/user2/repo20.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/config b/tests/gitea-repositories-meta/user2/repo20.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/config rename to tests/gitea-repositories-meta/user2/repo20.git/config diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/description b/tests/gitea-repositories-meta/user2/repo20.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/description rename to tests/gitea-repositories-meta/user2/repo20.git/description diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/post-receive rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/update b/tests/gitea-repositories-meta/user2/repo20.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/update rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/repo20.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user2/repo20.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/info/exclude b/tests/gitea-repositories-meta/user2/repo20.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/info/exclude rename to tests/gitea-repositories-meta/user2/repo20.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/info/refs b/tests/gitea-repositories-meta/user2/repo20.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/info/refs rename to tests/gitea-repositories-meta/user2/repo20.git/info/refs diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 b/tests/gitea-repositories-meta/user2/repo20.git/objects/02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/02/15cbe13d2695a2c3464ab5e59f47f37c3ff5d5 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/05/81d7edf45206787ff93956ea892e8a2ae77604 b/tests/gitea-repositories-meta/user2/repo20.git/objects/05/81d7edf45206787ff93956ea892e8a2ae77604 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/05/81d7edf45206787ff93956ea892e8a2ae77604 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/05/81d7edf45206787ff93956ea892e8a2ae77604 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 b/tests/gitea-repositories-meta/user2/repo20.git/objects/1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/1b/271d83842d348b1ee71d8e6ead400aaeb4d1b5 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 b/tests/gitea-repositories-meta/user2/repo20.git/objects/29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/29/5ba6ac57fdd46f62a51272f40e60b6dea697b2 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 b/tests/gitea-repositories-meta/user2/repo20.git/objects/2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/2c/ec0f7069ed09d934e904c49f414d8bdf818ce4 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/41/4a282859758ba7b159bfbd9c2b193eb8f135ee b/tests/gitea-repositories-meta/user2/repo20.git/objects/41/4a282859758ba7b159bfbd9c2b193eb8f135ee similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/41/4a282859758ba7b159bfbd9c2b193eb8f135ee rename to tests/gitea-repositories-meta/user2/repo20.git/objects/41/4a282859758ba7b159bfbd9c2b193eb8f135ee diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/80/8038d2f71b0ab020991439cffd24309c7bc530 b/tests/gitea-repositories-meta/user2/repo20.git/objects/80/8038d2f71b0ab020991439cffd24309c7bc530 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/80/8038d2f71b0ab020991439cffd24309c7bc530 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/80/8038d2f71b0ab020991439cffd24309c7bc530 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/83/70977f63979e140b6b58992b1fdb4098b24cd9 b/tests/gitea-repositories-meta/user2/repo20.git/objects/83/70977f63979e140b6b58992b1fdb4098b24cd9 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/83/70977f63979e140b6b58992b1fdb4098b24cd9 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/83/70977f63979e140b6b58992b1fdb4098b24cd9 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 b/tests/gitea-repositories-meta/user2/repo20.git/objects/8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/8c/e1dee41e1a3700819a9a309f275f8dc7b7e0b6 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/ba/3aeafe10402c6b29535a58d91def7e43638d9d b/tests/gitea-repositories-meta/user2/repo20.git/objects/ba/3aeafe10402c6b29535a58d91def7e43638d9d similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/ba/3aeafe10402c6b29535a58d91def7e43638d9d rename to tests/gitea-repositories-meta/user2/repo20.git/objects/ba/3aeafe10402c6b29535a58d91def7e43638d9d diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/c5/0ac6b9e25abb8200bb377755367d7265c581cf b/tests/gitea-repositories-meta/user2/repo20.git/objects/c5/0ac6b9e25abb8200bb377755367d7265c581cf similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/c5/0ac6b9e25abb8200bb377755367d7265c581cf rename to tests/gitea-repositories-meta/user2/repo20.git/objects/c5/0ac6b9e25abb8200bb377755367d7265c581cf diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a b/tests/gitea-repositories-meta/user2/repo20.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a rename to tests/gitea-repositories-meta/user2/repo20.git/objects/ce/013625030ba8dba906f756967f9e9ca394464a diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/db/89c972fc57862eae378f45b74aca228037d415 b/tests/gitea-repositories-meta/user2/repo20.git/objects/db/89c972fc57862eae378f45b74aca228037d415 similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/db/89c972fc57862eae378f45b74aca228037d415 rename to tests/gitea-repositories-meta/user2/repo20.git/objects/db/89c972fc57862eae378f45b74aca228037d415 diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/objects/info/packs b/tests/gitea-repositories-meta/user2/repo20.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/objects/info/packs rename to tests/gitea-repositories-meta/user2/repo20.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user2/repo20.git/refs/heads/master b/tests/gitea-repositories-meta/user2/repo20.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/repo20.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/repo20.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/HEAD b/tests/gitea-repositories-meta/user2/utf8.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/HEAD rename to tests/gitea-repositories-meta/user2/utf8.git/HEAD diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/config b/tests/gitea-repositories-meta/user2/utf8.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/config rename to tests/gitea-repositories-meta/user2/utf8.git/config diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/description b/tests/gitea-repositories-meta/user2/utf8.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/description rename to tests/gitea-repositories-meta/user2/utf8.git/description diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/post-receive b/tests/gitea-repositories-meta/user2/utf8.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/post-receive rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user2/utf8.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive b/tests/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/update b/tests/gitea-repositories-meta/user2/utf8.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/update rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user2/utf8.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user2/utf8.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/info/exclude b/tests/gitea-repositories-meta/user2/utf8.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/info/exclude rename to tests/gitea-repositories-meta/user2/utf8.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/info/refs b/tests/gitea-repositories-meta/user2/utf8.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/info/refs rename to tests/gitea-repositories-meta/user2/utf8.git/info/refs diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/14/c42687126acae9d1ad41d7bdb528f811065a6a b/tests/gitea-repositories-meta/user2/utf8.git/objects/14/c42687126acae9d1ad41d7bdb528f811065a6a similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/14/c42687126acae9d1ad41d7bdb528f811065a6a rename to tests/gitea-repositories-meta/user2/utf8.git/objects/14/c42687126acae9d1ad41d7bdb528f811065a6a diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/1d/5e00f305a7ca6a8a94e65456820a6d260adab8 b/tests/gitea-repositories-meta/user2/utf8.git/objects/1d/5e00f305a7ca6a8a94e65456820a6d260adab8 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/1d/5e00f305a7ca6a8a94e65456820a6d260adab8 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/1d/5e00f305a7ca6a8a94e65456820a6d260adab8 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/28/d579e4920fbf4f66e71dab3e779d9fbf41422a b/tests/gitea-repositories-meta/user2/utf8.git/objects/28/d579e4920fbf4f66e71dab3e779d9fbf41422a similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/28/d579e4920fbf4f66e71dab3e779d9fbf41422a rename to tests/gitea-repositories-meta/user2/utf8.git/objects/28/d579e4920fbf4f66e71dab3e779d9fbf41422a diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b b/tests/gitea-repositories-meta/user2/utf8.git/objects/3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b rename to tests/gitea-repositories-meta/user2/utf8.git/objects/3a/810dbf6b96afaa8c5f69a8b6ec1dabfca7368b diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/a73c3499bff049a352b4e265575373e964b89a b/tests/gitea-repositories-meta/user2/utf8.git/objects/3a/a73c3499bff049a352b4e265575373e964b89a similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/a73c3499bff049a352b4e265575373e964b89a rename to tests/gitea-repositories-meta/user2/utf8.git/objects/3a/a73c3499bff049a352b4e265575373e964b89a diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 b/tests/gitea-repositories-meta/user2/utf8.git/objects/3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/3a/c6084110205f98174c4f1ec7e78cb21a15dfc2 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a b/tests/gitea-repositories-meta/user2/utf8.git/objects/4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a rename to tests/gitea-repositories-meta/user2/utf8.git/objects/4c/61dd0a799e0830e77edfe6c74f7c349bc8e62a diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/50/4d9fe743979d4e9785a25a363c7007293f0838 b/tests/gitea-repositories-meta/user2/utf8.git/objects/50/4d9fe743979d4e9785a25a363c7007293f0838 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/50/4d9fe743979d4e9785a25a363c7007293f0838 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/50/4d9fe743979d4e9785a25a363c7007293f0838 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/56/92bcf9f7c9eacb1ad68442161f2573877f96f4 b/tests/gitea-repositories-meta/user2/utf8.git/objects/56/92bcf9f7c9eacb1ad68442161f2573877f96f4 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/56/92bcf9f7c9eacb1ad68442161f2573877f96f4 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/56/92bcf9f7c9eacb1ad68442161f2573877f96f4 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/59/e2c41e8f5140bb0182acebec17c8ad9831cc62 b/tests/gitea-repositories-meta/user2/utf8.git/objects/59/e2c41e8f5140bb0182acebec17c8ad9831cc62 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/59/e2c41e8f5140bb0182acebec17c8ad9831cc62 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/59/e2c41e8f5140bb0182acebec17c8ad9831cc62 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/64/89894ad11093fdc49c0ed857d80682344a7264 b/tests/gitea-repositories-meta/user2/utf8.git/objects/64/89894ad11093fdc49c0ed857d80682344a7264 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/64/89894ad11093fdc49c0ed857d80682344a7264 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/64/89894ad11093fdc49c0ed857d80682344a7264 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/6d/0c79ce3401c67d1ad522e61c47083a9fdee16c b/tests/gitea-repositories-meta/user2/utf8.git/objects/6d/0c79ce3401c67d1ad522e61c47083a9fdee16c similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/6d/0c79ce3401c67d1ad522e61c47083a9fdee16c rename to tests/gitea-repositories-meta/user2/utf8.git/objects/6d/0c79ce3401c67d1ad522e61c47083a9fdee16c diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/84/7c6d93c6860dd377651245711b7fbcd34a18d4 b/tests/gitea-repositories-meta/user2/utf8.git/objects/84/7c6d93c6860dd377651245711b7fbcd34a18d4 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/84/7c6d93c6860dd377651245711b7fbcd34a18d4 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/84/7c6d93c6860dd377651245711b7fbcd34a18d4 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/9b/9cc8f558d1c4f815592496fa24308ba2a9c824 b/tests/gitea-repositories-meta/user2/utf8.git/objects/9b/9cc8f558d1c4f815592496fa24308ba2a9c824 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/9b/9cc8f558d1c4f815592496fa24308ba2a9c824 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/9b/9cc8f558d1c4f815592496fa24308ba2a9c824 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad b/tests/gitea-repositories-meta/user2/utf8.git/objects/a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad rename to tests/gitea-repositories-meta/user2/utf8.git/objects/a4/f1bb3f2f8c6a0e840e935812ef4903ce515dad diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/a9/a61830fbf4e84999d3b20cf178954366701fe5 b/tests/gitea-repositories-meta/user2/utf8.git/objects/a9/a61830fbf4e84999d3b20cf178954366701fe5 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/a9/a61830fbf4e84999d3b20cf178954366701fe5 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/a9/a61830fbf4e84999d3b20cf178954366701fe5 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/c7/85b65bf16928b58567cb23669125c0ccd25a4f b/tests/gitea-repositories-meta/user2/utf8.git/objects/c7/85b65bf16928b58567cb23669125c0ccd25a4f similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/c7/85b65bf16928b58567cb23669125c0ccd25a4f rename to tests/gitea-repositories-meta/user2/utf8.git/objects/c7/85b65bf16928b58567cb23669125c0ccd25a4f diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/e9/63733b8a355cf860c465b4af7b236a6ef08783 b/tests/gitea-repositories-meta/user2/utf8.git/objects/e9/63733b8a355cf860c465b4af7b236a6ef08783 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/e9/63733b8a355cf860c465b4af7b236a6ef08783 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/e9/63733b8a355cf860c465b4af7b236a6ef08783 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 b/tests/gitea-repositories-meta/user2/utf8.git/objects/eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/eb/f146f803fccbc1471ef01d8fa0fe12c14e61a5 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/ee/9686cb562f492f64381bff7f298b2a1c67a141 b/tests/gitea-repositories-meta/user2/utf8.git/objects/ee/9686cb562f492f64381bff7f298b2a1c67a141 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/ee/9686cb562f492f64381bff7f298b2a1c67a141 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/ee/9686cb562f492f64381bff7f298b2a1c67a141 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 b/tests/gitea-repositories-meta/user2/utf8.git/objects/f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 rename to tests/gitea-repositories-meta/user2/utf8.git/objects/f4/02ff67c0b3161c3988dbf6188e6e0df257fd75 diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/objects/info/packs b/tests/gitea-repositories-meta/user2/utf8.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/objects/info/packs rename to tests/gitea-repositories-meta/user2/utf8.git/objects/info/packs diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/Gr\303\274\303\237en" diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Plus+Is+Not+Space b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/Plus+Is+Not+Space similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Plus+Is+Not+Space rename to tests/gitea-repositories-meta/user2/utf8.git/refs/heads/Plus+Is+Not+Space diff --git a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/master b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/master rename to tests/gitea-repositories-meta/user2/utf8.git/refs/heads/master diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\223\320\273\320\260\320\262\320\275\320\260\321\217\320\222\320\265\321\202\320\272\320\260" diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\320\260/\320\261/\320\262" diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/heads/\343\203\226\343\203\251\343\203\263\343\203\201" diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\201/\344\272\272" diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\320\242\321\215\320\263" diff --git "a/integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" "b/tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" similarity index 100% rename from "integrations/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" rename to "tests/gitea-repositories-meta/user2/utf8.git/refs/tags/\343\202\277\343\202\260" diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/HEAD b/tests/gitea-repositories-meta/user27/repo49.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/HEAD rename to tests/gitea-repositories-meta/user27/repo49.git/HEAD diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/config b/tests/gitea-repositories-meta/user27/repo49.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/config rename to tests/gitea-repositories-meta/user27/repo49.git/config diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/description b/tests/gitea-repositories-meta/user27/repo49.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/description rename to tests/gitea-repositories-meta/user27/repo49.git/description diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/post-receive rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/update b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/update rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user27/repo49.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/info/exclude b/tests/gitea-repositories-meta/user27/repo49.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/info/exclude rename to tests/gitea-repositories-meta/user27/repo49.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/info/refs b/tests/gitea-repositories-meta/user27/repo49.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/info/refs rename to tests/gitea-repositories-meta/user27/repo49.git/info/refs diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 b/tests/gitea-repositories-meta/user27/repo49.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 rename to tests/gitea-repositories-meta/user27/repo49.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d b/tests/gitea-repositories-meta/user27/repo49.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d rename to tests/gitea-repositories-meta/user27/repo49.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 b/tests/gitea-repositories-meta/user27/repo49.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 rename to tests/gitea-repositories-meta/user27/repo49.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 b/tests/gitea-repositories-meta/user27/repo49.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 rename to tests/gitea-repositories-meta/user27/repo49.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 b/tests/gitea-repositories-meta/user27/repo49.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 rename to tests/gitea-repositories-meta/user27/repo49.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb b/tests/gitea-repositories-meta/user27/repo49.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb rename to tests/gitea-repositories-meta/user27/repo49.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f b/tests/gitea-repositories-meta/user27/repo49.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f rename to tests/gitea-repositories-meta/user27/repo49.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/objects/info/packs b/tests/gitea-repositories-meta/user27/repo49.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/objects/info/packs rename to tests/gitea-repositories-meta/user27/repo49.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/master b/tests/gitea-repositories-meta/user27/repo49.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/master rename to tests/gitea-repositories-meta/user27/repo49.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive b/tests/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive similarity index 100% rename from integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive rename to tests/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive diff --git a/integrations/gitea-repositories-meta/user27/template1.git/HEAD b/tests/gitea-repositories-meta/user27/template1.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/HEAD rename to tests/gitea-repositories-meta/user27/template1.git/HEAD diff --git a/integrations/gitea-repositories-meta/user27/template1.git/config b/tests/gitea-repositories-meta/user27/template1.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/config rename to tests/gitea-repositories-meta/user27/template1.git/config diff --git a/integrations/gitea-repositories-meta/user27/template1.git/description b/tests/gitea-repositories-meta/user27/template1.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/description rename to tests/gitea-repositories-meta/user27/template1.git/description diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/post-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/post-receive rename to tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/pre-receive b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user27/template1.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/update b/tests/gitea-repositories-meta/user27/template1.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/update rename to tests/gitea-repositories-meta/user27/template1.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user27/template1.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user27/template1.git/info/exclude b/tests/gitea-repositories-meta/user27/template1.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/info/exclude rename to tests/gitea-repositories-meta/user27/template1.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user27/template1.git/info/refs b/tests/gitea-repositories-meta/user27/template1.git/info/refs similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/info/refs rename to tests/gitea-repositories-meta/user27/template1.git/info/refs diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 b/tests/gitea-repositories-meta/user27/template1.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 rename to tests/gitea-repositories-meta/user27/template1.git/objects/47/34b1f84a367fa1b81c31aa4234a5bad11cafa3 diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d b/tests/gitea-repositories-meta/user27/template1.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d rename to tests/gitea-repositories-meta/user27/template1.git/objects/4d/31f3a12656368a8d9180f431d40d0fc408be2d diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 b/tests/gitea-repositories-meta/user27/template1.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 rename to tests/gitea-repositories-meta/user27/template1.git/objects/51/f84af231345367fd5d61ceb89efb3b6d757061 diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 b/tests/gitea-repositories-meta/user27/template1.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 rename to tests/gitea-repositories-meta/user27/template1.git/objects/79/3aa682b06ae032641abf70c5dfeade28c07c52 diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 b/tests/gitea-repositories-meta/user27/template1.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 rename to tests/gitea-repositories-meta/user27/template1.git/objects/aa/cbdfe9e1c4b47f60abe81849045fa4e96f1d75 diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb b/tests/gitea-repositories-meta/user27/template1.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb rename to tests/gitea-repositories-meta/user27/template1.git/objects/dd/392e939ea4936b2459219c9c9a1f25547ccaeb diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f b/tests/gitea-repositories-meta/user27/template1.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f rename to tests/gitea-repositories-meta/user27/template1.git/objects/f2/8eeca3df7614fd4f10c1030f13feb418ef3c6f diff --git a/integrations/gitea-repositories-meta/user27/template1.git/objects/info/packs b/tests/gitea-repositories-meta/user27/template1.git/objects/info/packs similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/objects/info/packs rename to tests/gitea-repositories-meta/user27/template1.git/objects/info/packs diff --git a/integrations/gitea-repositories-meta/user27/template1.git/refs/heads/master b/tests/gitea-repositories-meta/user27/template1.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user27/template1.git/refs/heads/master rename to tests/gitea-repositories-meta/user27/template1.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/HEAD b/tests/gitea-repositories-meta/user3/repo3.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/HEAD rename to tests/gitea-repositories-meta/user3/repo3.git/HEAD diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/config b/tests/gitea-repositories-meta/user3/repo3.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/config rename to tests/gitea-repositories-meta/user3/repo3.git/config diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/description b/tests/gitea-repositories-meta/user3/repo3.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/description rename to tests/gitea-repositories-meta/user3/repo3.git/description diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive b/tests/gitea-repositories-meta/user3/repo3.git/hooks/post-receive similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/post-receive diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea b/tests/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/post-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive b/tests/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea b/tests/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/pre-receive.d/gitea diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update b/tests/gitea-repositories-meta/user3/repo3.git/hooks/update similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/update rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/update diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea b/tests/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea rename to tests/gitea-repositories-meta/user3/repo3.git/hooks/update.d/gitea diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/info/exclude b/tests/gitea-repositories-meta/user3/repo3.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/info/exclude rename to tests/gitea-repositories-meta/user3/repo3.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 b/tests/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 rename to tests/gitea-repositories-meta/user3/repo3.git/objects/20/ade30d25e0ecaeec84e7f542a8456900858240 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 b/tests/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 rename to tests/gitea-repositories-meta/user3/repo3.git/objects/27/74debeea6dc742cc4971a92db0e08b95b60588 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 b/tests/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 rename to tests/gitea-repositories-meta/user3/repo3.git/objects/2a/47ca4b614a9f5a43abbd5ad851a54a616ffee6 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f b/tests/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f rename to tests/gitea-repositories-meta/user3/repo3.git/objects/2f/9b22fd3159a43b7b4e5dd806fcd544edf8716f diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 b/tests/gitea-repositories-meta/user3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 rename to tests/gitea-repositories-meta/user3/repo3.git/objects/d2/2b4d4daa5be07329fcef6ed458f00cf3392da0 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc b/tests/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc rename to tests/gitea-repositories-meta/user3/repo3.git/objects/d5/6a3073c1dbb7b15963110a049d50cdb5db99fc diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 b/tests/gitea-repositories-meta/user3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 rename to tests/gitea-repositories-meta/user3/repo3.git/objects/ec/f0db3c1ec806522de4b491fb9a3c7457398c61 diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df b/tests/gitea-repositories-meta/user3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df rename to tests/gitea-repositories-meta/user3/repo3.git/objects/ee/16d127df463aa491e08958120f2108b02468df diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master b/tests/gitea-repositories-meta/user3/repo3.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/master rename to tests/gitea-repositories-meta/user3/repo3.git/refs/heads/master diff --git a/integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/test_branch b/tests/gitea-repositories-meta/user3/repo3.git/refs/heads/test_branch similarity index 100% rename from integrations/gitea-repositories-meta/user3/repo3.git/refs/heads/test_branch rename to tests/gitea-repositories-meta/user3/repo3.git/refs/heads/test_branch diff --git a/integrations/gitea-repositories-meta/user30/empty.git/HEAD b/tests/gitea-repositories-meta/user30/empty.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user30/empty.git/HEAD rename to tests/gitea-repositories-meta/user30/empty.git/HEAD diff --git a/integrations/gitea-repositories-meta/user30/empty.git/config b/tests/gitea-repositories-meta/user30/empty.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user30/empty.git/config rename to tests/gitea-repositories-meta/user30/empty.git/config diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/HEAD b/tests/gitea-repositories-meta/user5/repo4.git/HEAD similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/HEAD rename to tests/gitea-repositories-meta/user5/repo4.git/HEAD diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/config b/tests/gitea-repositories-meta/user5/repo4.git/config similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/config rename to tests/gitea-repositories-meta/user5/repo4.git/config diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/description b/tests/gitea-repositories-meta/user5/repo4.git/description similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/description rename to tests/gitea-repositories-meta/user5/repo4.git/description diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/info/exclude b/tests/gitea-repositories-meta/user5/repo4.git/info/exclude similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/info/exclude rename to tests/gitea-repositories-meta/user5/repo4.git/info/exclude diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/objects/16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 b/tests/gitea-repositories-meta/user5/repo4.git/objects/16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/objects/16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 rename to tests/gitea-repositories-meta/user5/repo4.git/objects/16/dfebd1ed3905d78d7e061e945fc9c34afe4e81 diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/objects/c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f b/tests/gitea-repositories-meta/user5/repo4.git/objects/c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/objects/c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f rename to tests/gitea-repositories-meta/user5/repo4.git/objects/c1/202ad022ae7d3a6d2474dc76d5a0c8e87cdc0f diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/objects/c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 b/tests/gitea-repositories-meta/user5/repo4.git/objects/c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/objects/c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 rename to tests/gitea-repositories-meta/user5/repo4.git/objects/c7/cd3cd144e6d23c9d6f3d07e52b2c1a956e0338 diff --git a/integrations/gitea-repositories-meta/user5/repo4.git/refs/heads/master b/tests/gitea-repositories-meta/user5/repo4.git/refs/heads/master similarity index 100% rename from integrations/gitea-repositories-meta/user5/repo4.git/refs/heads/master rename to tests/gitea-repositories-meta/user5/repo4.git/refs/heads/master diff --git a/integrations/README.md b/tests/integration/README.md similarity index 93% rename from integrations/README.md rename to tests/integration/README.md index 40cdcde47430..636949df38f4 100644 --- a/integrations/README.md +++ b/tests/integration/README.md @@ -1,11 +1,13 @@ -# Integrations tests +# Integration tests Integration tests can be run with make commands for the appropriate backends, namely: ```shell -make test-mysql -make test-pgsql make test-sqlite +make test-pgsql +make test-mysql +make test-mysql8 +make test-mssql ``` Make sure to perform a clean build before running tests: @@ -18,13 +20,13 @@ make clean build drone exec --local --build-event "pull_request" ``` -## Run sqlite integrations tests +## Run sqlite integration tests Start tests ``` make test-sqlite ``` -## Run MySQL integrations tests +## Run MySQL integration tests Setup a MySQL database inside docker ``` docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -p 3306:3306 --rm --name mysql mysql:latest #(just ctrl-c to stop db and clean the container) @@ -35,7 +37,7 @@ Start tests based on the database container TEST_MYSQL_HOST=localhost:3306 TEST_MYSQL_DBNAME=test TEST_MYSQL_USERNAME=root TEST_MYSQL_PASSWORD='' make test-mysql ``` -## Run pgsql integrations tests +## Run pgsql integration tests Setup a pgsql database inside docker ``` docker run -e "POSTGRES_DB=test" -p 5432:5432 --rm --name pgsql postgres:latest #(just ctrl-c to stop db and clean the container) @@ -45,7 +47,7 @@ Start tests based on the database container TEST_PGSQL_HOST=localhost:5432 TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres make test-pgsql ``` -## Run mssql integrations tests +## Run mssql integration tests Setup a mssql database inside docker ``` docker run -e "ACCEPT_EULA=Y" -e "MSSQL_PID=Standard" -e "SA_PASSWORD=MwantsaSecurePassword1" -p 1433:1433 --rm --name mssql microsoft/mssql-server-linux:latest #(just ctrl-c to stop db and clean the container) diff --git a/integrations/README_ZH.md b/tests/integration/README_ZH.md similarity index 98% rename from integrations/README_ZH.md rename to tests/integration/README_ZH.md index eebb14de737d..38402324720b 100644 --- a/integrations/README_ZH.md +++ b/tests/integration/README_ZH.md @@ -43,7 +43,7 @@ docker run -e "POSTGRES_DB=test" -p 5432:5432 --rm --name pgsql postgres:14 #(ju TEST_PGSQL_HOST=localhost:5432 TEST_PGSQL_DBNAME=test TEST_PGSQL_USERNAME=postgres TEST_PGSQL_PASSWORD=postgres make test-pgsql ``` -## Run mssql integrations tests +## Run mssql integration tests 同上,首先在 docker 容器里部署一个 mssql 数据库 ``` docker run -e "ACCEPT_EULA=Y" -e "MSSQL_PID=Standard" -e "SA_PASSWORD=MwantsaSecurePassword1" -p 1433:1433 --rm --name mssql microsoft/mssql-server-linux:latest #(just ctrl-c to stop db and clean the container) diff --git a/integrations/admin_user_test.go b/tests/integration/admin_user_test.go similarity index 92% rename from integrations/admin_user_test.go rename to tests/integration/admin_user_test.go index 2225c903df9c..ffe3f670fe8d 100644 --- a/integrations/admin_user_test.go +++ b/tests/integration/admin_user_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,12 +11,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAdminViewUsers(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users") @@ -28,7 +29,7 @@ func TestAdminViewUsers(t *testing.T) { } func TestAdminViewUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users/1") @@ -40,7 +41,7 @@ func TestAdminViewUser(t *testing.T) { } func TestAdminEditUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testSuccessfullEdit(t, user_model.User{ID: 2, Name: "newusername", LoginName: "otherlogin", Email: "new@e-mail.gitea"}) } @@ -68,7 +69,7 @@ func makeRequest(t *testing.T, formData user_model.User, headerCode int) { } func TestAdminDeleteUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") diff --git a/integrations/api_activitypub_person_test.go b/tests/integration/api_activitypub_person_test.go similarity index 99% rename from integrations/api_activitypub_person_test.go rename to tests/integration/api_activitypub_person_test.go index c0548df0bcf4..e7ef79d156d6 100644 --- a/integrations/api_activitypub_person_test.go +++ b/tests/integration/api_activitypub_person_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" diff --git a/integrations/api_admin_org_test.go b/tests/integration/api_admin_org_test.go similarity index 97% rename from integrations/api_admin_org_test.go rename to tests/integration/api_admin_org_test.go index 8f36850a1a14..720f6fc6b645 100644 --- a/integrations/api_admin_org_test.go +++ b/tests/integration/api_admin_org_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -70,7 +71,7 @@ func TestAPIAdminOrgCreateBadVisibility(t *testing.T) { } func TestAPIAdminOrgCreateNotAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() nonAdminUsername := "user2" session := loginUser(t, nonAdminUsername) token := getTokenForLoggedInUser(t, session) diff --git a/integrations/api_admin_test.go b/tests/integration/api_admin_test.go similarity index 95% rename from integrations/api_admin_test.go rename to tests/integration/api_admin_test.go index e32b86684472..dea0bdd0632c 100644 --- a/integrations/api_admin_test.go +++ b/tests/integration/api_admin_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIAdminCreateAndDeleteSSHKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // user1 is an admin user session := loginUser(t, "user1") keyOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user2"}) @@ -48,7 +49,7 @@ func TestAPIAdminCreateAndDeleteSSHKey(t *testing.T) { } func TestAPIAdminDeleteMissingSSHKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // user1 is an admin user session := loginUser(t, "user1") @@ -58,7 +59,7 @@ func TestAPIAdminDeleteMissingSSHKey(t *testing.T) { } func TestAPIAdminDeleteUnauthorizedKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" session := loginUser(t, adminUsername) @@ -81,7 +82,7 @@ func TestAPIAdminDeleteUnauthorizedKey(t *testing.T) { } func TestAPISudoUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" session := loginUser(t, adminUsername) @@ -97,7 +98,7 @@ func TestAPISudoUser(t *testing.T) { } func TestAPISudoUserForbidden(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" @@ -110,7 +111,7 @@ func TestAPISudoUserForbidden(t *testing.T) { } func TestAPIListUsers(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" session := loginUser(t, adminUsername) token := getTokenForLoggedInUser(t, session) @@ -133,13 +134,13 @@ func TestAPIListUsers(t *testing.T) { } func TestAPIListUsersNotLoggedIn(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/api/v1/admin/users") MakeRequest(t, req, http.StatusUnauthorized) } func TestAPIListUsersNonAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() nonAdminUsername := "user2" session := loginUser(t, nonAdminUsername) token := getTokenForLoggedInUser(t, session) @@ -148,7 +149,7 @@ func TestAPIListUsersNonAdmin(t *testing.T) { } func TestAPICreateUserInvalidEmail(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" session := loginUser(t, adminUsername) token := getTokenForLoggedInUser(t, session) @@ -167,7 +168,7 @@ func TestAPICreateUserInvalidEmail(t *testing.T) { } func TestAPIEditUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" session := loginUser(t, adminUsername) token := getTokenForLoggedInUser(t, session) diff --git a/integrations/api_branch_test.go b/tests/integration/api_branch_test.go similarity index 96% rename from integrations/api_branch_test.go rename to tests/integration/api_branch_test.go index e137331343f3..bdfdd3c7520b 100644 --- a/integrations/api_branch_test.go +++ b/tests/integration/api_branch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,6 +10,7 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -87,7 +88,7 @@ func testAPIDeleteBranch(t *testing.T, branchName string, expectedHTTPStatus int } func TestAPIGetBranch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() for _, test := range []struct { BranchName string Exists bool @@ -111,7 +112,7 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { giteaURL.Path = ctx.GitPath() t.Run("CreateRepo", doAPICreateRepository(ctx, false)) - tests := []struct { + testCases := []struct { OldBranch string NewBranch string ExpectedHTTPStatus int @@ -147,8 +148,8 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { ExpectedHTTPStatus: http.StatusNotFound, }, } - for _, test := range tests { - defer resetFixtures(t) + for _, test := range testCases { + defer tests.ResetFixtures(t) session := ctx.Session testAPICreateBranch(t, session, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) } @@ -173,7 +174,7 @@ func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBran } func TestAPIBranchProtection(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // Branch protection only on branch that exist testAPICreateBranchProtection(t, "master/doesnotexist", http.StatusNotFound) diff --git a/integrations/api_comment_test.go b/tests/integration/api_comment_test.go similarity index 96% rename from integrations/api_comment_test.go rename to tests/integration/api_comment_test.go index ac1079b02de0..126d886842e4 100644 --- a/integrations/api_comment_test.go +++ b/tests/integration/api_comment_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -16,12 +16,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIListRepoComments(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{}, unittest.Cond("type = ?", issues_model.CommentTypeComment)) @@ -67,7 +68,7 @@ func TestAPIListRepoComments(t *testing.T) { } func TestAPIListIssueComments(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{}, unittest.Cond("type = ?", issues_model.CommentTypeComment)) @@ -88,7 +89,7 @@ func TestAPIListIssueComments(t *testing.T) { } func TestAPICreateComment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() const commentBody = "Comment body" issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{}) @@ -111,7 +112,7 @@ func TestAPICreateComment(t *testing.T) { } func TestAPIGetComment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: 2}) assert.NoError(t, comment.LoadIssue()) @@ -138,7 +139,7 @@ func TestAPIGetComment(t *testing.T) { } func TestAPIEditComment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() const newCommentBody = "This is the new comment body" comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{}, @@ -164,7 +165,7 @@ func TestAPIEditComment(t *testing.T) { } func TestAPIDeleteComment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{}, unittest.Cond("type = ?", issues_model.CommentTypeComment)) @@ -182,7 +183,7 @@ func TestAPIDeleteComment(t *testing.T) { } func TestAPIListIssueTimeline(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // load comment issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) diff --git a/integrations/api_fork_test.go b/tests/integration/api_fork_test.go similarity index 84% rename from integrations/api_fork_test.go rename to tests/integration/api_fork_test.go index 4f3b023312cc..131dcf70bb96 100644 --- a/integrations/api_fork_test.go +++ b/tests/integration/api_fork_test.go @@ -2,17 +2,18 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" ) func TestCreateForkNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithJSON(t, "POST", "/api/v1/repos/user2/repo1/forks", &api.CreateForkOption{}) MakeRequest(t, req, http.StatusUnauthorized) } diff --git a/integrations/api_gpg_keys_test.go b/tests/integration/api_gpg_keys_test.go similarity index 99% rename from integrations/api_gpg_keys_test.go rename to tests/integration/api_gpg_keys_test.go index 38341aecff7f..0ad876c9b97a 100644 --- a/integrations/api_gpg_keys_test.go +++ b/tests/integration/api_gpg_keys_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,6 +11,7 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -18,7 +19,7 @@ import ( type makeRequestFunc func(testing.TB, *http.Request, int) *httptest.ResponseRecorder func TestGPGKeys(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session) diff --git a/integrations/api_helper_for_declarative_test.go b/tests/integration/api_helper_for_declarative_test.go similarity index 99% rename from integrations/api_helper_for_declarative_test.go rename to tests/integration/api_helper_for_declarative_test.go index 181a6469467c..5a798f79f0fc 100644 --- a/integrations/api_helper_for_declarative_test.go +++ b/tests/integration/api_helper_for_declarative_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" diff --git a/integrations/api_httpsig_test.go b/tests/integration/api_httpsig_test.go similarity index 98% rename from integrations/api_httpsig_test.go rename to tests/integration/api_httpsig_test.go index 7197e9afb992..80b3c586b432 100644 --- a/integrations/api_httpsig_test.go +++ b/tests/integration/api_httpsig_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "encoding/base64" @@ -12,6 +12,7 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/go-fed/httpsig" "golang.org/x/crypto/ssh" @@ -50,7 +51,7 @@ fhTNAzWwZoQ91aHdAAAAFHUwMDIyMTQ2QGljdHMtcC1ueC03AQIDBAUG func TestHTTPSigPubKey(t *testing.T) { // Add our public key to user1 - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") token := url.QueryEscape(getTokenForLoggedInUser(t, session)) keysURL := fmt.Sprintf("/api/v1/user/keys?token=%s", token) @@ -87,7 +88,7 @@ func TestHTTPSigPubKey(t *testing.T) { func TestHTTPSigCert(t *testing.T) { // Add our public key to user1 - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") csrf := GetCSRF(t, session, "/user/settings/keys") diff --git a/integrations/api_issue_label_test.go b/tests/integration/api_issue_label_test.go similarity index 99% rename from integrations/api_issue_label_test.go rename to tests/integration/api_issue_label_test.go index 9d9fdcfbc30c..586c50a55f17 100644 --- a/integrations/api_issue_label_test.go +++ b/tests/integration/api_issue_label_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/api_issue_milestone_test.go b/tests/integration/api_issue_milestone_test.go similarity index 97% rename from integrations/api_issue_milestone_test.go rename to tests/integration/api_issue_milestone_test.go index ba97c99b9dd8..e22a091bb8d1 100644 --- a/integrations/api_issue_milestone_test.go +++ b/tests/integration/api_issue_milestone_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIIssuesMilestone(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() milestone := unittest.AssertExistsAndLoadBean(t, &issues_model.Milestone{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: milestone.RepoID}) diff --git a/integrations/api_issue_reaction_test.go b/tests/integration/api_issue_reaction_test.go similarity index 97% rename from integrations/api_issue_reaction_test.go rename to tests/integration/api_issue_reaction_test.go index ca6b69721ce2..a3cb9303fbcf 100644 --- a/integrations/api_issue_reaction_test.go +++ b/tests/integration/api_issue_reaction_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -16,12 +16,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIIssuesReactions(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) _ = issue.LoadRepo(db.DefaultContext) @@ -78,7 +79,7 @@ func TestAPIIssuesReactions(t *testing.T) { } func TestAPICommentReactions(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{ID: 2}) _ = comment.LoadIssue() diff --git a/integrations/api_issue_stopwatch_test.go b/tests/integration/api_issue_stopwatch_test.go similarity index 95% rename from integrations/api_issue_stopwatch_test.go rename to tests/integration/api_issue_stopwatch_test.go index 052a1ad9fc9b..c2ad9c45e820 100644 --- a/integrations/api_issue_stopwatch_test.go +++ b/tests/integration/api_issue_stopwatch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIListStopWatches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -43,7 +44,7 @@ func TestAPIListStopWatches(t *testing.T) { } func TestAPIStopStopWatches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 2}) _ = issue.LoadRepo(db.DefaultContext) @@ -59,7 +60,7 @@ func TestAPIStopStopWatches(t *testing.T) { } func TestAPICancelStopWatches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) _ = issue.LoadRepo(db.DefaultContext) @@ -75,7 +76,7 @@ func TestAPICancelStopWatches(t *testing.T) { } func TestAPIStartStopWatches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 3}) _ = issue.LoadRepo(db.DefaultContext) diff --git a/integrations/api_issue_subscription_test.go b/tests/integration/api_issue_subscription_test.go similarity index 97% rename from integrations/api_issue_subscription_test.go rename to tests/integration/api_issue_subscription_test.go index db3d1694d650..f4588fbbc42c 100644 --- a/integrations/api_issue_subscription_test.go +++ b/tests/integration/api_issue_subscription_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIIssueSubscriptions(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue1 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) issue2 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 2}) diff --git a/integrations/api_issue_test.go b/tests/integration/api_issue_test.go similarity index 98% rename from integrations/api_issue_test.go rename to tests/integration/api_issue_test.go index afb2f75c15fb..3e651c620b04 100644 --- a/integrations/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -18,12 +18,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIListIssues(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -73,7 +74,7 @@ func TestAPIListIssues(t *testing.T) { } func TestAPICreateIssue(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() const body, title = "apiTestBody", "apiTestTitle" repoBefore := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -106,7 +107,7 @@ func TestAPICreateIssue(t *testing.T) { } func TestAPIEditIssue(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issueBefore := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 10}) repoBefore := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) @@ -168,7 +169,7 @@ func TestAPIEditIssue(t *testing.T) { } func TestAPISearchIssues(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() token := getUserToken(t, "user2") @@ -268,7 +269,7 @@ func TestAPISearchIssues(t *testing.T) { } func TestAPISearchIssuesWithLabels(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // as this API was used in the frontend, it uses UI page size expectedIssueCount := 15 // from the fixtures diff --git a/integrations/api_issue_tracked_time_test.go b/tests/integration/api_issue_tracked_time_test.go similarity index 97% rename from integrations/api_issue_tracked_time_test.go rename to tests/integration/api_issue_tracked_time_test.go index 504aacf000d7..6e2c77030cb7 100644 --- a/integrations/api_issue_tracked_time_test.go +++ b/tests/integration/api_issue_tracked_time_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIGetTrackedTimes(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) issue2 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 2}) @@ -62,7 +63,7 @@ func TestAPIGetTrackedTimes(t *testing.T) { } func TestAPIDeleteTrackedTime(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() time6 := unittest.AssertExistsAndLoadBean(t, &issues_model.TrackedTime{ID: 6}) issue2 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 2}) @@ -97,7 +98,7 @@ func TestAPIDeleteTrackedTime(t *testing.T) { } func TestAPIAddTrackedTimes(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue2 := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 2}) assert.NoError(t, issue2.LoadRepo(db.DefaultContext)) diff --git a/integrations/api_keys_test.go b/tests/integration/api_keys_test.go similarity index 96% rename from integrations/api_keys_test.go rename to tests/integration/api_keys_test.go index 76d1122086b1..1cb0b20ffe16 100644 --- a/integrations/api_keys_test.go +++ b/tests/integration/api_keys_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -16,18 +16,19 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestViewDeployKeysNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1/keys") MakeRequest(t, req, http.StatusUnauthorized) } func TestCreateDeployKeyNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithJSON(t, "POST", "/api/v1/repos/user2/repo1/keys", api.CreateKeyOption{ Title: "title", Key: "key", @@ -36,19 +37,19 @@ func TestCreateDeployKeyNoLogin(t *testing.T) { } func TestGetDeployKeyNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1/keys/1") MakeRequest(t, req, http.StatusUnauthorized) } func TestDeleteDeployKeyNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "DELETE", "/api/v1/repos/user2/repo1/keys/1") MakeRequest(t, req, http.StatusUnauthorized) } func TestCreateReadOnlyDeployKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: "repo1"}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -74,7 +75,7 @@ func TestCreateReadOnlyDeployKey(t *testing.T) { } func TestCreateReadWriteDeployKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{Name: "repo1"}) repoOwner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -99,7 +100,7 @@ func TestCreateReadWriteDeployKey(t *testing.T) { } func TestCreateUserKey(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "user1"}) session := loginUser(t, "user1") diff --git a/integrations/api_nodeinfo_test.go b/tests/integration/api_nodeinfo_test.go similarity index 98% rename from integrations/api_nodeinfo_test.go rename to tests/integration/api_nodeinfo_test.go index bbb79120784e..76f9105a5128 100644 --- a/integrations/api_nodeinfo_test.go +++ b/tests/integration/api_nodeinfo_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" diff --git a/integrations/api_notification_test.go b/tests/integration/api_notification_test.go similarity index 98% rename from integrations/api_notification_test.go rename to tests/integration/api_notification_test.go index bd28f49851ee..bf85520bb53b 100644 --- a/integrations/api_notification_test.go +++ b/tests/integration/api_notification_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPINotification(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -138,7 +139,7 @@ func TestAPINotification(t *testing.T) { } func TestAPINotificationPUT(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) thread5 := unittest.AssertExistsAndLoadBean(t, &activities_model.Notification{ID: 5}) diff --git a/integrations/api_oauth2_apps_test.go b/tests/integration/api_oauth2_apps_test.go similarity index 98% rename from integrations/api_oauth2_apps_test.go rename to tests/integration/api_oauth2_apps_test.go index 4eead582d148..fe3525724e26 100644 --- a/integrations/api_oauth2_apps_test.go +++ b/tests/integration/api_oauth2_apps_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file.package models -package integrations +package integration import ( "fmt" @@ -13,12 +13,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestOAuth2Application(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testAPICreateOAuth2Application(t) testAPIListOAuth2Applications(t) testAPIGetOAuth2Application(t) diff --git a/integrations/api_org_test.go b/tests/integration/api_org_test.go similarity index 98% rename from integrations/api_org_test.go rename to tests/integration/api_org_test.go index a3c1827e7046..70bb17bee2e1 100644 --- a/integrations/api_org_test.go +++ b/tests/integration/api_org_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -14,6 +14,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -138,7 +139,7 @@ func TestAPIOrgDeny(t *testing.T) { } func TestAPIGetAll(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestf(t, "GET", "/api/v1/orgs") resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/api_packages_composer_test.go b/tests/integration/api_packages_composer_test.go similarity index 95% rename from integrations/api_packages_composer_test.go rename to tests/integration/api_packages_composer_test.go index 7c58ae62be6a..90285f78d3ab 100644 --- a/integrations/api_packages_composer_test.go +++ b/tests/integration/api_packages_composer_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/zip" @@ -19,12 +19,13 @@ import ( composer_module "code.gitea.io/gitea/modules/packages/composer" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/routers/api/packages/composer" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageComposer(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) vendorName := "gitea" @@ -56,7 +57,7 @@ func TestPackageComposer(t *testing.T) { url := fmt.Sprintf("%sapi/packages/%s/composer", setting.AppURL, user.Name) t.Run("ServiceIndex", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/packages.json", url)) req = AddBasicAuthHeader(req, user.Name) @@ -72,7 +73,7 @@ func TestPackageComposer(t *testing.T) { t.Run("Upload", func(t *testing.T) { t.Run("MissingVersion", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url, bytes.NewReader(content)) req = AddBasicAuthHeader(req, user.Name) @@ -80,7 +81,7 @@ func TestPackageComposer(t *testing.T) { }) t.Run("Valid", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadURL := url + "?version=" + packageVersion @@ -116,7 +117,7 @@ func TestPackageComposer(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeComposer) assert.NoError(t, err) @@ -140,7 +141,7 @@ func TestPackageComposer(t *testing.T) { }) t.Run("SearchService", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Query string @@ -174,7 +175,7 @@ func TestPackageComposer(t *testing.T) { }) t.Run("EnumeratePackages", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", url+"/list.json") req = AddBasicAuthHeader(req, user.Name) @@ -190,7 +191,7 @@ func TestPackageComposer(t *testing.T) { }) t.Run("PackageMetadata", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/p2/%s/%s.json", url, vendorName, projectName)) req = AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_conan_test.go b/tests/integration/api_packages_conan_test.go similarity index 96% rename from integrations/api_packages_conan_test.go rename to tests/integration/api_packages_conan_test.go index e14555d1d03d..5b344173439d 100644 --- a/integrations/api_packages_conan_test.go +++ b/tests/integration/api_packages_conan_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -20,6 +20,7 @@ import ( conan_module "code.gitea.io/gitea/modules/packages/conan" "code.gitea.io/gitea/modules/setting" conan_router "code.gitea.io/gitea/routers/api/packages/conan" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -204,7 +205,7 @@ func uploadConanPackageV2(t *testing.T, baseURL, token, name, version, user, cha } func TestPackageConan(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) name := "ConanPackage" @@ -221,7 +222,7 @@ func TestPackageConan(t *testing.T) { t.Run("v1", func(t *testing.T) { t.Run("Ping", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v1/ping", url)) resp := MakeRequest(t, req, http.StatusOK) @@ -232,7 +233,7 @@ func TestPackageConan(t *testing.T) { token := "" t.Run("Authenticate", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v1/users/authenticate", url)) req = AddBasicAuthHeader(req, user.Name) @@ -245,7 +246,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("CheckCredentials", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v1/users/check_credentials", url)) req = addTokenAuthHeader(req, token) @@ -253,12 +254,12 @@ func TestPackageConan(t *testing.T) { }) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadConanPackageV1(t, url, token, name, version1, user1, channel1) t.Run("Validate", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeConan) assert.NoError(t, err) @@ -302,7 +303,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() recipeURL := fmt.Sprintf("%s/v1/conans/%s/%s/%s/%s", url, name, version1, user1, channel1) @@ -368,7 +369,7 @@ func TestPackageConan(t *testing.T) { uploadConanPackageV1(t, url, token, name, version1, user2, channel2) t.Run("Recipe", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Query string @@ -405,7 +406,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Package", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v1/conans/%s/%s/%s/%s/search", url, name, version1, user1, channel2)) resp := MakeRequest(t, req, http.StatusOK) @@ -421,7 +422,7 @@ func TestPackageConan(t *testing.T) { t.Run("Delete", func(t *testing.T) { t.Run("Package", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Channel string @@ -450,7 +451,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Recipe", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Channel string @@ -479,7 +480,7 @@ func TestPackageConan(t *testing.T) { t.Run("v2", func(t *testing.T) { t.Run("Ping", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v2/ping", url)) resp := MakeRequest(t, req, http.StatusOK) @@ -490,7 +491,7 @@ func TestPackageConan(t *testing.T) { token := "" t.Run("Authenticate", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v2/users/authenticate", url)) req = AddBasicAuthHeader(req, user.Name) @@ -503,7 +504,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("CheckCredentials", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v2/users/check_credentials", url)) req = addTokenAuthHeader(req, token) @@ -511,12 +512,12 @@ func TestPackageConan(t *testing.T) { }) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadConanPackageV2(t, url, token, name, version1, user1, channel1, revision1, revision1) t.Run("Validate", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeConan) assert.NoError(t, err) @@ -525,7 +526,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Latest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() recipeURL := fmt.Sprintf("%s/v2/conans/%s/%s/%s/%s", url, name, version1, user1, channel1) @@ -547,7 +548,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("ListRevisions", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadConanPackageV2(t, url, token, name, version1, user1, channel1, revision1, revision2) uploadConanPackageV2(t, url, token, name, version1, user1, channel1, revision2, revision1) @@ -590,7 +591,7 @@ func TestPackageConan(t *testing.T) { t.Run("Search", func(t *testing.T) { t.Run("Recipe", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Query string @@ -627,7 +628,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Package", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/v2/conans/%s/%s/%s/%s/search", url, name, version1, user1, channel1)) resp := MakeRequest(t, req, http.StatusOK) @@ -653,7 +654,7 @@ func TestPackageConan(t *testing.T) { t.Run("Delete", func(t *testing.T) { t.Run("Package", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() rref, _ := conan_module.NewRecipeReference(name, version1, user1, channel1, revision1) pref, _ := conan_module.NewPackageReference(rref, conanPackageReference, conan_module.DefaultRevision) @@ -695,7 +696,7 @@ func TestPackageConan(t *testing.T) { }) t.Run("Recipe", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() rref, _ := conan_module.NewRecipeReference(name, version1, user1, channel1, conan_module.DefaultRevision) diff --git a/integrations/api_packages_container_test.go b/tests/integration/api_packages_container_test.go similarity index 96% rename from integrations/api_packages_container_test.go rename to tests/integration/api_packages_container_test.go index c62ab5dbb882..adced5d661ab 100644 --- a/integrations/api_packages_container_test.go +++ b/tests/integration/api_packages_container_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -21,12 +21,13 @@ import ( "code.gitea.io/gitea/modules/packages/container/oci" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageContainer(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) @@ -80,7 +81,7 @@ func TestPackageContainer(t *testing.T) { authenticate := []string{`Bearer realm="` + setting.AppURL + `v2/token",service="container_registry",scope="*"`} t.Run("Anonymous", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%sv2", setting.AppURL)) resp := MakeRequest(t, req, http.StatusUnauthorized) @@ -103,7 +104,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("User", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%sv2", setting.AppURL)) resp := MakeRequest(t, req, http.StatusUnauthorized) @@ -128,7 +129,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("DetermineSupport", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%sv2", setting.AppURL)) addTokenAuthHeader(req, userToken) @@ -141,7 +142,7 @@ func TestPackageContainer(t *testing.T) { url := fmt.Sprintf("%sv2/%s/%s", setting.AppURL, user.Name, image) t.Run("UploadBlob/Monolithic", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "POST", fmt.Sprintf("%s/blobs/uploads", url)) addTokenAuthHeader(req, anonymousToken) @@ -171,7 +172,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("UploadBlob/Chunked", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "POST", fmt.Sprintf("%s/blobs/uploads", url)) addTokenAuthHeader(req, userToken) @@ -221,7 +222,7 @@ func TestPackageContainer(t *testing.T) { for _, tag := range tags { t.Run(fmt.Sprintf("[Tag:%s]", tag), func(t *testing.T) { t.Run("UploadManifest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "POST", fmt.Sprintf("%s/blobs/uploads?digest=%s", url, configDigest), strings.NewReader(configContent)) addTokenAuthHeader(req, userToken) @@ -296,7 +297,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("HeadManifest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "HEAD", fmt.Sprintf("%s/manifests/unknown-tag", url)) addTokenAuthHeader(req, userToken) @@ -311,7 +312,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("GetManifest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/manifests/unknown-tag", url)) addTokenAuthHeader(req, userToken) @@ -330,7 +331,7 @@ func TestPackageContainer(t *testing.T) { } t.Run("UploadUntaggedManifest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", fmt.Sprintf("%s/manifests/%s", url, untaggedManifestDigest), strings.NewReader(untaggedManifestContent)) addTokenAuthHeader(req, userToken) @@ -370,7 +371,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("UploadIndexManifest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", fmt.Sprintf("%s/manifests/%s", url, multiTag), strings.NewReader(indexManifestContent)) addTokenAuthHeader(req, userToken) @@ -407,7 +408,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("UploadBlob/Mount", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "POST", fmt.Sprintf("%s/blobs/uploads?mount=%s", url, unknownDigest)) addTokenAuthHeader(req, userToken) @@ -422,7 +423,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("HeadBlob", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "HEAD", fmt.Sprintf("%s/blobs/%s", url, unknownDigest)) addTokenAuthHeader(req, userToken) @@ -437,7 +438,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("GetBlob", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/blobs/%s", url, unknownDigest)) addTokenAuthHeader(req, userToken) @@ -453,7 +454,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("GetTagList", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { URL string @@ -515,7 +516,7 @@ func TestPackageContainer(t *testing.T) { t.Run("Delete", func(t *testing.T) { t.Run("Blob", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("%s/blobs/%s", url, blobDigest)) addTokenAuthHeader(req, userToken) @@ -527,7 +528,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("ManifestByDigest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("%s/manifests/%s", url, untaggedManifestDigest)) addTokenAuthHeader(req, userToken) @@ -539,7 +540,7 @@ func TestPackageContainer(t *testing.T) { }) t.Run("ManifestByTag", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("%s/manifests/%s", url, multiTag)) addTokenAuthHeader(req, userToken) @@ -554,11 +555,11 @@ func TestPackageContainer(t *testing.T) { } t.Run("OwnerNameChange", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() checkCatalog := func(owner string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", fmt.Sprintf("%sv2/_catalog", setting.AppURL)) addTokenAuthHeader(req, userToken) diff --git a/integrations/api_packages_generic_test.go b/tests/integration/api_packages_generic_test.go similarity index 92% rename from integrations/api_packages_generic_test.go rename to tests/integration/api_packages_generic_test.go index f2aff8ed240c..9fcd2cc797f1 100644 --- a/integrations/api_packages_generic_test.go +++ b/tests/integration/api_packages_generic_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/packages" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageGeneric(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) packageName := "te-st_pac.kage" @@ -30,7 +31,7 @@ func TestPackageGeneric(t *testing.T) { url := fmt.Sprintf("/api/packages/%s/generic/%s/%s", user.Name, packageName, packageVersion) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url+"/"+filename, bytes.NewReader(content)) AddBasicAuthHeader(req, user.Name) @@ -57,7 +58,7 @@ func TestPackageGeneric(t *testing.T) { assert.Equal(t, int64(len(content)), pb.Size) t.Run("Exists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url+"/"+filename, bytes.NewReader(content)) AddBasicAuthHeader(req, user.Name) @@ -65,7 +66,7 @@ func TestPackageGeneric(t *testing.T) { }) t.Run("Additional", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url+"/dummy.bin", bytes.NewReader(content)) AddBasicAuthHeader(req, user.Name) @@ -79,7 +80,7 @@ func TestPackageGeneric(t *testing.T) { }) t.Run("InvalidParameter", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", fmt.Sprintf("/api/packages/%s/generic/%s/%s/%s", user.Name, "invalid+package name", packageVersion, filename), bytes.NewReader(content)) AddBasicAuthHeader(req, user.Name) @@ -96,7 +97,7 @@ func TestPackageGeneric(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() checkDownloadCount := func(count int64) { pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeGeneric) @@ -120,7 +121,7 @@ func TestPackageGeneric(t *testing.T) { checkDownloadCount(2) t.Run("NotExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", url+"/not.found") MakeRequest(t, req, http.StatusNotFound) @@ -128,10 +129,10 @@ func TestPackageGeneric(t *testing.T) { }) t.Run("Delete", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("File", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", url+"/"+filename) MakeRequest(t, req, http.StatusUnauthorized) @@ -152,7 +153,7 @@ func TestPackageGeneric(t *testing.T) { assert.Len(t, pvs, 1) t.Run("RemovesVersion", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req = NewRequest(t, "DELETE", url+"/dummy.bin") AddBasicAuthHeader(req, user.Name) @@ -165,7 +166,7 @@ func TestPackageGeneric(t *testing.T) { }) t.Run("Version", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url+"/"+filename, bytes.NewReader(content)) AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_helm_test.go b/tests/integration/api_packages_helm_test.go similarity index 96% rename from integrations/api_packages_helm_test.go rename to tests/integration/api_packages_helm_test.go index 8ea5e8a7b09f..393bf3cbe2cb 100644 --- a/integrations/api_packages_helm_test.go +++ b/tests/integration/api_packages_helm_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/tar" @@ -19,13 +19,14 @@ import ( user_model "code.gitea.io/gitea/models/user" helm_module "code.gitea.io/gitea/modules/packages/helm" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" ) func TestPackageHelm(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) packageName := "test-chart" @@ -63,7 +64,7 @@ dependencies: url := fmt.Sprintf("/api/packages/%s/helm", user.Name) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadURL := url + "/api/charts" @@ -98,7 +99,7 @@ dependencies: }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() checkDownloadCount := func(count int64) { pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeHelm) @@ -119,7 +120,7 @@ dependencies: }) t.Run("Index", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/index.yaml", url)) req = AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_maven_test.go b/tests/integration/api_packages_maven_test.go similarity index 94% rename from integrations/api_packages_maven_test.go rename to tests/integration/api_packages_maven_test.go index 512039b6a567..87d95557ce31 100644 --- a/integrations/api_packages_maven_test.go +++ b/tests/integration/api_packages_maven_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/packages/maven" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageMaven(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) groupID := "com.gitea" @@ -39,7 +40,7 @@ func TestPackageMaven(t *testing.T) { } t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() putFile(t, fmt.Sprintf("/%s/%s", packageVersion, filename), "test", http.StatusCreated) putFile(t, fmt.Sprintf("/%s/%s", packageVersion, filename), "test", http.StatusBadRequest) @@ -68,13 +69,13 @@ func TestPackageMaven(t *testing.T) { }) t.Run("UploadExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() putFile(t, fmt.Sprintf("/%s/%s", packageVersion, filename), "test", http.StatusBadRequest) }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/%s/%s", root, packageVersion, filename)) req = AddBasicAuthHeader(req, user.Name) @@ -89,15 +90,15 @@ func TestPackageMaven(t *testing.T) { }) t.Run("UploadVerifySHA1", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("Missmatch", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() putFile(t, fmt.Sprintf("/%s/%s.sha1", packageVersion, filename), "test", http.StatusBadRequest) }) t.Run("Valid", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() putFile(t, fmt.Sprintf("/%s/%s.sha1", packageVersion, filename), "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", http.StatusOK) }) @@ -112,7 +113,7 @@ func TestPackageMaven(t *testing.T) { ` t.Run("UploadPOM", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeMaven) assert.NoError(t, err) @@ -147,7 +148,7 @@ func TestPackageMaven(t *testing.T) { }) t.Run("DownloadPOM", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/%s/%s.pom", root, packageVersion, filename)) req = AddBasicAuthHeader(req, user.Name) @@ -162,7 +163,7 @@ func TestPackageMaven(t *testing.T) { }) t.Run("DownloadChecksums", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/1.2.3/%s", root, filename)) req = AddBasicAuthHeader(req, user.Name) @@ -183,7 +184,7 @@ func TestPackageMaven(t *testing.T) { }) t.Run("DownloadMetadata", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", root+"/maven-metadata.xml") req = AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_npm_test.go b/tests/integration/api_packages_npm_test.go similarity index 95% rename from integrations/api_packages_npm_test.go rename to tests/integration/api_packages_npm_test.go index 8b22ead6d99f..fe6cea1cb68d 100644 --- a/integrations/api_packages_npm_test.go +++ b/tests/integration/api_packages_npm_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "encoding/base64" @@ -18,12 +18,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/packages/npm" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageNpm(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := fmt.Sprintf("Bearer %s", getTokenForLoggedInUser(t, loginUser(t, user.Name))) @@ -72,7 +73,7 @@ func TestPackageNpm(t *testing.T) { filename := fmt.Sprintf("%s-%s.tgz", strings.Split(packageName, "/")[1], packageVersion) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", root, strings.NewReader(buildUpload(packageVersion))) req = addTokenAuthHeader(req, token) @@ -104,7 +105,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("UploadExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", root, strings.NewReader(buildUpload(packageVersion))) req = addTokenAuthHeader(req, token) @@ -112,7 +113,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/-/%s/%s", root, packageVersion, filename)) req = addTokenAuthHeader(req, token) @@ -128,7 +129,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("PackageMetadata", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("/api/packages/%s/npm/%s", user.Name, "does-not-exist")) req = addTokenAuthHeader(req, token) @@ -159,7 +160,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("AddTag", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() test := func(t *testing.T, status int, tag, version string) { req := NewRequestWithBody(t, "PUT", fmt.Sprintf("%s/%s", tagsRoot, tag), strings.NewReader(`"`+version+`"`)) @@ -175,7 +176,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("ListTags", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", tagsRoot) req = addTokenAuthHeader(req, token) @@ -192,7 +193,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("PackageMetadataDistTags", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", root) req = addTokenAuthHeader(req, token) @@ -209,7 +210,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("DeleteTag", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() test := func(t *testing.T, status int, tag string) { req := NewRequest(t, "DELETE", fmt.Sprintf("%s/%s", tagsRoot, tag)) @@ -224,7 +225,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("Delete", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", root, strings.NewReader(buildUpload(packageVersion+"-dummy"))) req = addTokenAuthHeader(req, token) @@ -238,7 +239,7 @@ func TestPackageNpm(t *testing.T) { MakeRequest(t, req, http.StatusOK) t.Run("Version", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeNpm) assert.NoError(t, err) @@ -257,7 +258,7 @@ func TestPackageNpm(t *testing.T) { }) t.Run("Full", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeNpm) assert.NoError(t, err) diff --git a/integrations/api_packages_nuget_test.go b/tests/integration/api_packages_nuget_test.go similarity index 96% rename from integrations/api_packages_nuget_test.go rename to tests/integration/api_packages_nuget_test.go index 5b662309ea1f..87275feb3ef8 100644 --- a/integrations/api_packages_nuget_test.go +++ b/tests/integration/api_packages_nuget_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/zip" @@ -20,6 +20,7 @@ import ( nuget_module "code.gitea.io/gitea/modules/packages/nuget" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/routers/api/packages/nuget" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -30,7 +31,7 @@ func addNuGetAPIKeyHeader(request *http.Request, token string) *http.Request { } func TestPackageNuGet(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := getUserToken(t, user.Name) @@ -63,7 +64,7 @@ func TestPackageNuGet(t *testing.T) { url := fmt.Sprintf("/api/packages/%s/nuget", user.Name) t.Run("ServiceIndex", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/index.json", url)) req = AddBasicAuthHeader(req, user.Name) @@ -104,7 +105,7 @@ func TestPackageNuGet(t *testing.T) { t.Run("Upload", func(t *testing.T) { t.Run("DependencyPackage", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequestWithBody(t, "PUT", url, bytes.NewReader(content)) req = AddBasicAuthHeader(req, user.Name) @@ -137,7 +138,7 @@ func TestPackageNuGet(t *testing.T) { }) t.Run("SymbolPackage", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() createPackage := func(id, packageType string) io.Reader { var buf bytes.Buffer @@ -224,7 +225,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() checkDownloadCount := func(count int64) { pvs, err := packages.GetVersionsByPackageType(db.DefaultContext, user.ID, packages.TypeNuGet) @@ -250,7 +251,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) checkDownloadCount(1) t.Run("Symbol", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/symbols/%s/%sFFFFFFFF/gitea.pdb", url, symbolFilename, symbolID)) MakeRequest(t, req, http.StatusBadRequest) @@ -268,7 +269,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("SearchService", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() cases := []struct { Query string @@ -303,7 +304,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) contentURL := fmt.Sprintf("%s%s/package/%s/%s/%s.%s.nupkg", setting.AppURL, url[1:], packageName, packageVersion, packageName, packageVersion) t.Run("RegistrationIndex", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/registration/%s/index.json", url, packageName)) req = AddBasicAuthHeader(req, user.Name) @@ -329,7 +330,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("RegistrationLeaf", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/registration/%s/%s.json", url, packageName, packageVersion)) req = AddBasicAuthHeader(req, user.Name) @@ -345,7 +346,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("PackageService", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/package/%s/index.json", url, packageName)) req = AddBasicAuthHeader(req, user.Name) @@ -359,7 +360,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("Delete", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("%s/%s/%s", url, packageName, packageVersion)) req = AddBasicAuthHeader(req, user.Name) @@ -371,7 +372,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("DownloadNotExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/package/%s/%s/%s.%s.nupkg", url, packageName, packageVersion, packageName, packageVersion)) req = AddBasicAuthHeader(req, user.Name) @@ -383,7 +384,7 @@ AAAjQmxvYgAAAGm7ENm9SGxMtAFVvPUsPJTF6PbtAAAAAFcVogEJAAAAAQAAAA==`) }) t.Run("DeleteNotExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("%s/package/%s/%s", url, packageName, packageVersion)) req = AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_pub_test.go b/tests/integration/api_packages_pub_test.go similarity index 96% rename from integrations/api_packages_pub_test.go rename to tests/integration/api_packages_pub_test.go index 76d5116158e3..9e4ce63fa109 100644 --- a/integrations/api_packages_pub_test.go +++ b/tests/integration/api_packages_pub_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/tar" @@ -21,12 +21,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" pub_module "code.gitea.io/gitea/modules/packages/pub" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackagePub(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := "Bearer " + getUserToken(t, user.Name) @@ -57,7 +58,7 @@ description: ` + packageDescription root := fmt.Sprintf("/api/packages/%s/pub", user.Name) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadURL := root + "/api/packages/versions/new" @@ -123,7 +124,7 @@ description: ` + packageDescription }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/api/packages/%s/%s", root, packageName, packageVersion)) resp := MakeRequest(t, req, http.StatusOK) @@ -148,7 +149,7 @@ description: ` + packageDescription }) t.Run("EnumeratePackageVersions", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/api/packages/%s", root, packageName)) resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/api_packages_pypi_test.go b/tests/integration/api_packages_pypi_test.go similarity index 94% rename from integrations/api_packages_pypi_test.go rename to tests/integration/api_packages_pypi_test.go index a4c49ef1013b..32b3304ca79e 100644 --- a/integrations/api_packages_pypi_test.go +++ b/tests/integration/api_packages_pypi_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -19,12 +19,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/packages/pypi" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackagePyPI(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) packageName := "test-package" @@ -60,7 +61,7 @@ func TestPackagePyPI(t *testing.T) { } t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() filename := "test.whl" uploadFile(t, filename, content, http.StatusCreated) @@ -88,7 +89,7 @@ func TestPackagePyPI(t *testing.T) { }) t.Run("UploadAddFile", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() filename := "test.tar.gz" uploadFile(t, filename, content, http.StatusCreated) @@ -119,21 +120,21 @@ func TestPackagePyPI(t *testing.T) { }) t.Run("UploadHashMismatch", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() filename := "test2.whl" uploadFile(t, filename, "dummy", http.StatusBadRequest) }) t.Run("UploadExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadFile(t, "test.whl", content, http.StatusBadRequest) uploadFile(t, "test.tar.gz", content, http.StatusBadRequest) }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() downloadFile := func(filename string) { req := NewRequest(t, "GET", fmt.Sprintf("%s/files/%s/%s/%s", root, packageName, packageVersion, filename)) @@ -153,7 +154,7 @@ func TestPackagePyPI(t *testing.T) { }) t.Run("PackageMetadata", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/simple/%s", root, packageName)) req = AddBasicAuthHeader(req, user.Name) diff --git a/integrations/api_packages_rubygems_test.go b/tests/integration/api_packages_rubygems_test.go similarity index 97% rename from integrations/api_packages_rubygems_test.go rename to tests/integration/api_packages_rubygems_test.go index 2228d3d0c19e..6cf5af710b3b 100644 --- a/integrations/api_packages_rubygems_test.go +++ b/tests/integration/api_packages_rubygems_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -17,12 +17,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/packages/rubygems" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageRubyGems(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) packageName := "gitea" @@ -120,7 +121,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`) } t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadFile(t, http.StatusCreated) @@ -147,13 +148,13 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`) }) t.Run("UploadExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() uploadFile(t, http.StatusBadRequest) }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/gems/%s", root, packageFilename)) req = AddBasicAuthHeader(req, user.Name) @@ -168,7 +169,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`) }) t.Run("DownloadGemspec", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/quick/Marshal.4.8/%sspec.rz", root, packageFilename)) req = AddBasicAuthHeader(req, user.Name) @@ -187,7 +188,7 @@ gAAAAP//MS06Gw==`) }) t.Run("EnumeratePackages", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() enumeratePackages := func(t *testing.T, endpoint string, expectedContent []byte) { req := NewRequest(t, "GET", fmt.Sprintf("%s/%s", root, endpoint)) @@ -206,7 +207,7 @@ gAAAAP//MS06Gw==`) }) t.Run("Delete", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() body := bytes.Buffer{} writer := multipart.NewWriter(&body) diff --git a/integrations/api_packages_test.go b/tests/integration/api_packages_test.go similarity index 95% rename from integrations/api_packages_test.go rename to tests/integration/api_packages_test.go index fcdacacea09d..86d81994d4d2 100644 --- a/integrations/api_packages_test.go +++ b/tests/integration/api_packages_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -18,12 +18,13 @@ import ( user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" packages_service "code.gitea.io/gitea/services/packages" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageAPI(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) @@ -38,7 +39,7 @@ func TestPackageAPI(t *testing.T) { MakeRequest(t, req, http.StatusCreated) t.Run("ListPackages", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/packages/%s?token=%s", user.Name, token)) resp := MakeRequest(t, req, http.StatusOK) @@ -55,7 +56,7 @@ func TestPackageAPI(t *testing.T) { }) t.Run("GetPackage", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/packages/%s/dummy/%s/%s?token=%s", user.Name, packageName, packageVersion, token)) MakeRequest(t, req, http.StatusNotFound) @@ -73,7 +74,7 @@ func TestPackageAPI(t *testing.T) { assert.Equal(t, user.Name, p.Creator.UserName) t.Run("RepositoryLink", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() p, err := packages_model.GetPackageByName(db.DefaultContext, user.ID, packages_model.TypeGeneric, packageName) assert.NoError(t, err) @@ -112,7 +113,7 @@ func TestPackageAPI(t *testing.T) { }) t.Run("ListPackageFiles", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/packages/%s/dummy/%s/%s/files?token=%s", user.Name, packageName, packageVersion, token)) MakeRequest(t, req, http.StatusNotFound) @@ -133,7 +134,7 @@ func TestPackageAPI(t *testing.T) { }) t.Run("DeletePackage", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "DELETE", fmt.Sprintf("/api/v1/packages/%s/dummy/%s/%s?token=%s", user.Name, packageName, packageVersion, token)) MakeRequest(t, req, http.StatusNotFound) @@ -144,7 +145,7 @@ func TestPackageAPI(t *testing.T) { } func TestPackageCleanup(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() time.Sleep(time.Second) diff --git a/integrations/api_packages_vagrant_test.go b/tests/integration/api_packages_vagrant_test.go similarity index 95% rename from integrations/api_packages_vagrant_test.go rename to tests/integration/api_packages_vagrant_test.go index 8ce4f24ef5cc..1d2952e1a201 100644 --- a/integrations/api_packages_vagrant_test.go +++ b/tests/integration/api_packages_vagrant_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/tar" @@ -19,12 +19,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/json" vagrant_module "code.gitea.io/gitea/modules/packages/vagrant" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPackageVagrant(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) token := "Bearer " + getUserToken(t, user.Name) @@ -56,7 +57,7 @@ func TestPackageVagrant(t *testing.T) { root := fmt.Sprintf("/api/packages/%s/vagrant", user.Name) t.Run("Authenticate", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() authenticateURL := fmt.Sprintf("%s/authenticate", root) @@ -71,7 +72,7 @@ func TestPackageVagrant(t *testing.T) { boxURL := fmt.Sprintf("%s/%s", root, packageName) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "HEAD", boxURL) MakeRequest(t, req, http.StatusNotFound) @@ -116,7 +117,7 @@ func TestPackageVagrant(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", fmt.Sprintf("%s/%s/%s", boxURL, packageVersion, filename)) resp := MakeRequest(t, req, http.StatusOK) @@ -125,7 +126,7 @@ func TestPackageVagrant(t *testing.T) { }) t.Run("EnumeratePackageVersions", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", boxURL) resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/api_private_serv_test.go b/tests/integration/api_private_serv_test.go similarity index 99% rename from integrations/api_private_serv_test.go rename to tests/integration/api_private_serv_test.go index fd3cb25ef2de..6fd6d616db8a 100644 --- a/integrations/api_private_serv_test.go +++ b/tests/integration/api_private_serv_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" diff --git a/integrations/api_pull_commits_test.go b/tests/integration/api_pull_commits_test.go similarity index 93% rename from integrations/api_pull_commits_test.go rename to tests/integration/api_pull_commits_test.go index 693011c2350e..aa58f44bbe51 100644 --- a/integrations/api_pull_commits_test.go +++ b/tests/integration/api_pull_commits_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,12 +12,13 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIPullCommits(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() pullIssue := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: 2}) assert.NoError(t, pullIssue.LoadIssue()) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue.HeadRepoID}) diff --git a/integrations/api_pull_review_test.go b/tests/integration/api_pull_review_test.go similarity index 99% rename from integrations/api_pull_review_test.go rename to tests/integration/api_pull_review_test.go index 024ead905062..6ebad106fb31 100644 --- a/integrations/api_pull_review_test.go +++ b/tests/integration/api_pull_review_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIPullReview(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() pullIssue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 3}) assert.NoError(t, pullIssue.LoadAttributes(db.DefaultContext)) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue.RepoID}) @@ -223,7 +224,7 @@ func TestAPIPullReview(t *testing.T) { } func TestAPIPullReviewRequest(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() pullIssue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 3}) assert.NoError(t, pullIssue.LoadAttributes(db.DefaultContext)) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: pullIssue.RepoID}) diff --git a/integrations/api_pull_test.go b/tests/integration/api_pull_test.go similarity index 96% rename from integrations/api_pull_test.go rename to tests/integration/api_pull_test.go index 4cb1b43cbbc2..032912a07360 100644 --- a/integrations/api_pull_test.go +++ b/tests/integration/api_pull_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -17,12 +17,13 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/services/forms" issue_service "code.gitea.io/gitea/services/issue" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIViewPulls(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -39,7 +40,7 @@ func TestAPIViewPulls(t *testing.T) { // TestAPIMergePullWIP ensures that we can't merge a WIP pull request func TestAPIMergePullWIP(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{Status: issues_model.PullRequestStatusMergeable}, unittest.Cond("has_merged = ?", false)) @@ -62,7 +63,7 @@ func TestAPIMergePullWIP(t *testing.T) { } func TestAPICreatePullSuccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo10 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 10}) // repo10 have code, pulls units. repo11 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 11}) @@ -82,7 +83,7 @@ func TestAPICreatePullSuccess(t *testing.T) { } func TestAPICreatePullWithFieldsSuccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // repo10 have code, pulls units. repo10 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 10}) owner10 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo10.OwnerID}) @@ -119,7 +120,7 @@ func TestAPICreatePullWithFieldsSuccess(t *testing.T) { } func TestAPICreatePullWithFieldsFailure(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // repo10 have code, pulls units. repo10 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 10}) owner10 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo10.OwnerID}) @@ -153,7 +154,7 @@ func TestAPICreatePullWithFieldsFailure(t *testing.T) { } func TestAPIEditPull(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo10 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 10}) owner10 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo10.OwnerID}) diff --git a/integrations/api_releases_test.go b/tests/integration/api_releases_test.go similarity index 96% rename from integrations/api_releases_test.go rename to tests/integration/api_releases_test.go index ef9390390d75..0c7f5e2d521e 100644 --- a/integrations/api_releases_test.go +++ b/tests/integration/api_releases_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIListReleases(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) @@ -95,7 +96,7 @@ func createNewReleaseUsingAPI(t *testing.T, session *TestSession, token string, } func TestAPICreateAndUpdateRelease(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -147,7 +148,7 @@ func TestAPICreateAndUpdateRelease(t *testing.T) { } func TestAPICreateReleaseToDefaultBranch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -158,7 +159,7 @@ func TestAPICreateReleaseToDefaultBranch(t *testing.T) { } func TestAPICreateReleaseToDefaultBranchOnExistingTag(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -176,7 +177,7 @@ func TestAPICreateReleaseToDefaultBranchOnExistingTag(t *testing.T) { } func TestAPIGetReleaseByTag(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -209,7 +210,7 @@ func TestAPIGetReleaseByTag(t *testing.T) { } func TestAPIDeleteReleaseByTagName(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/integrations/api_repo_archive_test.go b/tests/integration/api_repo_archive_test.go similarity index 95% rename from integrations/api_repo_archive_test.go rename to tests/integration/api_repo_archive_test.go index ca959a12874f..3707cb7c1c8b 100644 --- a/integrations/api_repo_archive_test.go +++ b/tests/integration/api_repo_archive_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIDownloadArchive(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) diff --git a/integrations/api_repo_collaborator_test.go b/tests/integration/api_repo_collaborator_test.go similarity index 99% rename from integrations/api_repo_collaborator_test.go rename to tests/integration/api_repo_collaborator_test.go index f2e5bf648d80..3527e16572d9 100644 --- a/integrations/api_repo_collaborator_test.go +++ b/tests/integration/api_repo_collaborator_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/api_repo_edit_test.go b/tests/integration/api_repo_edit_test.go similarity index 99% rename from integrations/api_repo_edit_test.go rename to tests/integration/api_repo_edit_test.go index 677fc0beff50..5ef92bf47cf5 100644 --- a/integrations/api_repo_edit_test.go +++ b/tests/integration/api_repo_edit_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/api_repo_file_create_test.go b/tests/integration/api_repo_file_create_test.go similarity index 99% rename from integrations/api_repo_file_create_test.go rename to tests/integration/api_repo_file_create_test.go index f9ed479ca20e..f03efaa0eadf 100644 --- a/integrations/api_repo_file_create_test.go +++ b/tests/integration/api_repo_file_create_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( stdCtx "context" diff --git a/integrations/api_repo_file_delete_test.go b/tests/integration/api_repo_file_delete_test.go similarity index 99% rename from integrations/api_repo_file_delete_test.go rename to tests/integration/api_repo_file_delete_test.go index 340ffe362e8d..2c8b1e381f7c 100644 --- a/integrations/api_repo_file_delete_test.go +++ b/tests/integration/api_repo_file_delete_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/api_repo_file_get_test.go b/tests/integration/api_repo_file_get_test.go similarity index 95% rename from integrations/api_repo_file_get_test.go rename to tests/integration/api_repo_file_get_test.go index 8d1c4c4bcf0f..2a7a5fa63453 100644 --- a/integrations/api_repo_file_get_test.go +++ b/tests/integration/api_repo_file_get_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,12 +12,13 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIGetRawFileOrLFS(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // Test with raw file req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1/media/README.md") diff --git a/integrations/api_repo_file_helpers.go b/tests/integration/api_repo_file_helpers.go similarity index 97% rename from integrations/api_repo_file_helpers.go rename to tests/integration/api_repo_file_helpers.go index 465e03d53cce..298bae95c0d0 100644 --- a/integrations/api_repo_file_helpers.go +++ b/tests/integration/api_repo_file_helpers.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( repo_model "code.gitea.io/gitea/models/repo" diff --git a/integrations/api_repo_file_update_test.go b/tests/integration/api_repo_file_update_test.go similarity index 99% rename from integrations/api_repo_file_update_test.go rename to tests/integration/api_repo_file_update_test.go index 3044f0384417..a3be67ad844f 100644 --- a/integrations/api_repo_file_update_test.go +++ b/tests/integration/api_repo_file_update_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( stdCtx "context" diff --git a/integrations/api_repo_get_contents_list_test.go b/tests/integration/api_repo_get_contents_list_test.go similarity index 99% rename from integrations/api_repo_get_contents_list_test.go rename to tests/integration/api_repo_get_contents_list_test.go index 18231a2cafc5..4f2f5cb528c9 100644 --- a/integrations/api_repo_get_contents_list_test.go +++ b/tests/integration/api_repo_get_contents_list_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go similarity index 99% rename from integrations/api_repo_get_contents_test.go rename to tests/integration/api_repo_get_contents_test.go index 1fb8b9bf0dc3..dddc316e1a96 100644 --- a/integrations/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/api_repo_git_blobs_test.go b/tests/integration/api_repo_git_blobs_test.go similarity index 97% rename from integrations/api_repo_git_blobs_test.go rename to tests/integration/api_repo_git_blobs_test.go index 7b990450d893..cb5116c743b5 100644 --- a/integrations/api_repo_git_blobs_test.go +++ b/tests/integration/api_repo_git_blobs_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,12 +12,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIReposGitBlobs(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 user3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3 user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/integrations/api_repo_git_commits_test.go b/tests/integration/api_repo_git_commits_test.go similarity index 95% rename from integrations/api_repo_git_commits_test.go rename to tests/integration/api_repo_git_commits_test.go index 7eba5bd22362..99f83f943c31 100644 --- a/integrations/api_repo_git_commits_test.go +++ b/tests/integration/api_repo_git_commits_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -24,7 +25,7 @@ func compareCommitFiles(t *testing.T, expect []string, files []*api.CommitAffect } func TestAPIReposGitCommits(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -52,7 +53,7 @@ func TestAPIReposGitCommits(t *testing.T) { } func TestAPIReposGitCommitList(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -75,7 +76,7 @@ func TestAPIReposGitCommitList(t *testing.T) { } func TestAPIReposGitCommitListPage2Empty(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -92,7 +93,7 @@ func TestAPIReposGitCommitListPage2Empty(t *testing.T) { } func TestAPIReposGitCommitListDifferentBranch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -111,7 +112,7 @@ func TestAPIReposGitCommitListDifferentBranch(t *testing.T) { } func TestDownloadCommitDiffOrPatch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) @@ -133,7 +134,7 @@ func TestDownloadCommitDiffOrPatch(t *testing.T) { } func TestGetFileHistory(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) diff --git a/integrations/api_repo_git_hook_test.go b/tests/integration/api_repo_git_hook_test.go similarity index 94% rename from integrations/api_repo_git_hook_test.go rename to tests/integration/api_repo_git_hook_test.go index b90d66c175f8..a6c4f91d4a5b 100644 --- a/integrations/api_repo_git_hook_test.go +++ b/tests/integration/api_repo_git_hook_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -23,7 +24,7 @@ echo Hello, World! ` func TestAPIListGitHooks(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 37}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -49,7 +50,7 @@ func TestAPIListGitHooks(t *testing.T) { } func TestAPIListGitHooksNoHooks(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -70,7 +71,7 @@ func TestAPIListGitHooksNoHooks(t *testing.T) { } func TestAPIListGitHooksNoAccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -83,7 +84,7 @@ func TestAPIListGitHooksNoAccess(t *testing.T) { } func TestAPIGetGitHook(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 37}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -101,7 +102,7 @@ func TestAPIGetGitHook(t *testing.T) { } func TestAPIGetGitHookNoAccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -114,7 +115,7 @@ func TestAPIGetGitHookNoAccess(t *testing.T) { } func TestAPIEditGitHook(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -144,7 +145,7 @@ func TestAPIEditGitHook(t *testing.T) { } func TestAPIEditGitHookNoAccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -160,7 +161,7 @@ func TestAPIEditGitHookNoAccess(t *testing.T) { } func TestAPIDeleteGitHook(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 37}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) @@ -183,7 +184,7 @@ func TestAPIDeleteGitHook(t *testing.T) { } func TestAPIDeleteGitHookNoAccess(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/integrations/api_repo_git_notes_test.go b/tests/integration/api_repo_git_notes_test.go similarity index 98% rename from integrations/api_repo_git_notes_test.go rename to tests/integration/api_repo_git_notes_test.go index 733e0575dce7..713c7599c333 100644 --- a/integrations/api_repo_git_notes_test.go +++ b/tests/integration/api_repo_git_notes_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/api_repo_git_ref_test.go b/tests/integration/api_repo_git_ref_test.go similarity index 93% rename from integrations/api_repo_git_ref_test.go rename to tests/integration/api_repo_git_ref_test.go index 7ff16eb1c5a5..e8fc47f8dc30 100644 --- a/integrations/api_repo_git_ref_test.go +++ b/tests/integration/api_repo_git_ref_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,10 +10,11 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" ) func TestAPIReposGitRefs(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) diff --git a/integrations/api_repo_git_tags_test.go b/tests/integration/api_repo_git_tags_test.go similarity index 96% rename from integrations/api_repo_git_tags_test.go rename to tests/integration/api_repo_git_tags_test.go index 45551a4d7b5c..855eb2451e80 100644 --- a/integrations/api_repo_git_tags_test.go +++ b/tests/integration/api_repo_git_tags_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIGitTags(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) // Login as User2. @@ -64,7 +65,7 @@ func TestAPIGitTags(t *testing.T) { } func TestAPIDeleteTagByName(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/integrations/api_repo_git_trees_test.go b/tests/integration/api_repo_git_trees_test.go similarity index 97% rename from integrations/api_repo_git_trees_test.go rename to tests/integration/api_repo_git_trees_test.go index d80bcadb692f..385fec12ba15 100644 --- a/integrations/api_repo_git_trees_test.go +++ b/tests/integration/api_repo_git_trees_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,10 +11,11 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" ) func TestAPIReposGitTrees(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of the repo1 & repo16 user3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of the repo3 user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // owner of neither repos diff --git a/integrations/api_repo_languages_test.go b/tests/integration/api_repo_languages_test.go similarity index 98% rename from integrations/api_repo_languages_test.go rename to tests/integration/api_repo_languages_test.go index 8775d2502998..98373fb6b16a 100644 --- a/integrations/api_repo_languages_test.go +++ b/tests/integration/api_repo_languages_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/api_repo_lfs_locks_test.go b/tests/integration/api_repo_lfs_locks_test.go similarity index 98% rename from integrations/api_repo_lfs_locks_test.go rename to tests/integration/api_repo_lfs_locks_test.go index 3fd8f48f9751..0860f47533c8 100644 --- a/integrations/api_repo_lfs_locks_test.go +++ b/tests/integration/api_repo_lfs_locks_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -16,12 +16,13 @@ import ( "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPILFSLocksNotStarted(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = false user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -37,7 +38,7 @@ func TestAPILFSLocksNotStarted(t *testing.T) { } func TestAPILFSLocksNotLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -51,7 +52,7 @@ func TestAPILFSLocksNotLogin(t *testing.T) { } func TestAPILFSLocksLogged(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // in org 3 user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // in org 3 diff --git a/integrations/api_repo_lfs_migrate_test.go b/tests/integration/api_repo_lfs_migrate_test.go similarity index 95% rename from integrations/api_repo_lfs_migrate_test.go rename to tests/integration/api_repo_lfs_migrate_test.go index 1f6893f32a1f..d2edf67e8be5 100644 --- a/integrations/api_repo_lfs_migrate_test.go +++ b/tests/integration/api_repo_lfs_migrate_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -15,12 +15,13 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/services/migrations" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIRepoLFSMigrateLocal(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() oldImportLocalPaths := setting.ImportLocalPaths oldAllowLocalNetworks := setting.Migrations.AllowLocalNetworks diff --git a/integrations/api_repo_lfs_test.go b/tests/integration/api_repo_lfs_test.go similarity index 92% rename from integrations/api_repo_lfs_test.go rename to tests/integration/api_repo_lfs_test.go index 8bbc01995306..440dd04a8106 100644 --- a/integrations/api_repo_lfs_test.go +++ b/tests/integration/api_repo_lfs_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -19,12 +19,13 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPILFSNotStarted(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = false @@ -44,7 +45,7 @@ func TestAPILFSNotStarted(t *testing.T) { } func TestAPILFSMediaType(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true @@ -68,7 +69,7 @@ func createLFSTestRepository(t *testing.T, name string) *repo_model.Repository { } func TestAPILFSBatch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true @@ -94,7 +95,7 @@ func TestAPILFSBatch(t *testing.T) { } t.Run("InvalidJsonRequest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, nil) @@ -102,7 +103,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("InvalidOperation", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "dummy", @@ -112,7 +113,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("InvalidPointer", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "download", @@ -138,7 +139,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("PointerSizeMismatch", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "download", @@ -156,10 +157,10 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("Download", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("PointerNotInStore", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "download", @@ -176,7 +177,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("MetaNotFound", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() p := lfs.Pointer{Oid: "05eeb4eb5be71f2dd291ca39157d6d9effd7d1ea19cbdc8a99411fe2a8f26a00", Size: 6} @@ -200,7 +201,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("Success", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "download", @@ -221,10 +222,10 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("Upload", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("FileTooBig", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() oldMaxFileSize := setting.LFS.MaxFileSize setting.LFS.MaxFileSize = 2 @@ -247,7 +248,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("AddMeta", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() p := lfs.Pointer{Oid: "05eeb4eb5be71f2dd291ca39157d6d9effd7d1ea19cbdc8a99411fe2a8f26a00", Size: 6} @@ -285,7 +286,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("AlreadyExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "upload", @@ -302,7 +303,7 @@ func TestAPILFSBatch(t *testing.T) { }) t.Run("NewFile", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.BatchRequest{ Operation: "upload", @@ -328,7 +329,7 @@ func TestAPILFSBatch(t *testing.T) { } func TestAPILFSUpload(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true @@ -346,7 +347,7 @@ func TestAPILFSUpload(t *testing.T) { } t.Run("InvalidPointer", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, lfs.Pointer{Oid: "dummy"}, "") @@ -354,7 +355,7 @@ func TestAPILFSUpload(t *testing.T) { }) t.Run("AlreadyExistsInStore", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() p := lfs.Pointer{Oid: "83de2e488b89a0aa1c97496b888120a28b0c1e15463a4adb8405578c540f36d4", Size: 6} @@ -389,7 +390,7 @@ func TestAPILFSUpload(t *testing.T) { }) t.Run("MetaAlreadyExists", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, lfs.Pointer{Oid: oid, Size: 6}, "") @@ -397,7 +398,7 @@ func TestAPILFSUpload(t *testing.T) { }) t.Run("HashMismatch", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, lfs.Pointer{Oid: "2581dd7bbc1fe44726de4b7dd806a087a978b9c5aec0a60481259e34be09b06a", Size: 1}, "a") @@ -405,7 +406,7 @@ func TestAPILFSUpload(t *testing.T) { }) t.Run("SizeMismatch", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, lfs.Pointer{Oid: "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", Size: 2}, "a") @@ -413,7 +414,7 @@ func TestAPILFSUpload(t *testing.T) { }) t.Run("Success", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() p := lfs.Pointer{Oid: "6ccce4863b70f258d691f59609d31b4502e1ba5199942d3bc5d35d17a4ce771d", Size: 5} @@ -433,7 +434,7 @@ func TestAPILFSUpload(t *testing.T) { } func TestAPILFSVerify(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.LFS.StartServer = true @@ -453,7 +454,7 @@ func TestAPILFSVerify(t *testing.T) { } t.Run("InvalidJsonRequest", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, nil) @@ -461,7 +462,7 @@ func TestAPILFSVerify(t *testing.T) { }) t.Run("InvalidPointer", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.Pointer{}) @@ -469,7 +470,7 @@ func TestAPILFSVerify(t *testing.T) { }) t.Run("PointerNotExisting", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.Pointer{Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab042", Size: 6}) @@ -477,7 +478,7 @@ func TestAPILFSVerify(t *testing.T) { }) t.Run("Success", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := newRequest(t, &lfs.Pointer{Oid: oid, Size: 6}) diff --git a/integrations/api_repo_raw_test.go b/tests/integration/api_repo_raw_test.go similarity index 93% rename from integrations/api_repo_raw_test.go rename to tests/integration/api_repo_raw_test.go index 8e8cc750dde4..9793e12b4292 100644 --- a/integrations/api_repo_raw_test.go +++ b/tests/integration/api_repo_raw_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIReposRaw(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) diff --git a/integrations/api_repo_tags_test.go b/tests/integration/api_repo_tags_test.go similarity index 97% rename from integrations/api_repo_tags_test.go rename to tests/integration/api_repo_tags_test.go index 4b87093cdf3d..5d3a209a767a 100644 --- a/integrations/api_repo_tags_test.go +++ b/tests/integration/api_repo_tags_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,12 +13,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIRepoTags(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // Login as User2. session := loginUser(t, user.Name) diff --git a/integrations/api_repo_teams_test.go b/tests/integration/api_repo_teams_test.go similarity index 97% rename from integrations/api_repo_teams_test.go rename to tests/integration/api_repo_teams_test.go index 2ec69582865f..1e476a89e232 100644 --- a/integrations/api_repo_teams_test.go +++ b/tests/integration/api_repo_teams_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,12 +15,13 @@ import ( user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIRepoTeams(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // publicOrgRepo = user3/repo21 publicOrgRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 32}) diff --git a/integrations/api_repo_test.go b/tests/integration/api_repo_test.go similarity index 98% rename from integrations/api_repo_test.go rename to tests/integration/api_repo_test.go index 5631df323a46..483503ccbbcd 100644 --- a/integrations/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -20,12 +20,13 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIUserReposNotLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) req := NewRequestf(t, "GET", "/api/v1/users/%s/repos", user.Name) @@ -43,7 +44,7 @@ func TestAPIUserReposNotLogin(t *testing.T) { } func TestAPISearchRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() const keyword = "test" req := NewRequestf(t, "GET", "/api/v1/repos/search?q=%s", keyword) @@ -247,7 +248,7 @@ func getRepo(t *testing.T, repoID int64) *repo_model.Repository { } func TestAPIViewRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() var repo api.Repository @@ -277,7 +278,7 @@ func TestAPIViewRepo(t *testing.T) { } func TestAPIOrgRepos(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) user3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5}) @@ -323,7 +324,7 @@ func TestAPIOrgRepos(t *testing.T) { } func TestAPIGetRepoByIDUnauthorized(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) @@ -346,7 +347,7 @@ func TestAPIRepoMigrate(t *testing.T) { {ctxUserID: 2, userID: 3, cloneURL: "https://10.0.0.1/user/test_repo.git", repoName: "private-ip", expectedStatus: http.StatusUnprocessableEntity}, } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() for _, testCase := range testCases { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: testCase.ctxUserID}) session := loginUser(t, user.Name) @@ -415,7 +416,7 @@ func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) { // mirror-sync must fail with "400 (Bad Request)" when an attempt is made to // sync a non-mirror repository. func TestAPIMirrorSyncNonMirrorRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") token := getTokenForLoggedInUser(t, session) @@ -446,7 +447,7 @@ func TestAPIOrgRepoCreate(t *testing.T) { {ctxUserID: 28, orgName: "user6", repoName: "repo-not-creator", expectedStatus: http.StatusForbidden}, } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() for _, testCase := range testCases { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: testCase.ctxUserID}) session := loginUser(t, user.Name) @@ -512,7 +513,7 @@ func TestAPIRepoTransfer(t *testing.T) { {ctxUserID: 2, newOwner: "user6", teams: nil, expectedStatus: http.StatusCreated}, } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // create repo to move user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) @@ -576,7 +577,7 @@ func transfer(t *testing.T) *repo_model.Repository { } func TestAPIAcceptTransfer(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := transfer(t) @@ -602,7 +603,7 @@ func TestAPIAcceptTransfer(t *testing.T) { } func TestAPIRejectTransfer(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := transfer(t) @@ -628,7 +629,7 @@ func TestAPIRejectTransfer(t *testing.T) { } func TestAPIGenerateRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) session := loginUser(t, user.Name) @@ -665,7 +666,7 @@ func TestAPIGenerateRepo(t *testing.T) { } func TestAPIRepoGetReviewers(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) @@ -679,7 +680,7 @@ func TestAPIRepoGetReviewers(t *testing.T) { } func TestAPIRepoGetAssignees(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) diff --git a/integrations/api_repo_topic_test.go b/tests/integration/api_repo_topic_test.go similarity index 98% rename from integrations/api_repo_topic_test.go rename to tests/integration/api_repo_topic_test.go index e99c682e211f..4e1e29389068 100644 --- a/integrations/api_repo_topic_test.go +++ b/tests/integration/api_repo_topic_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPITopicSearch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() searchURL, _ := url.Parse("/api/v1/topics/search") var topics struct { TopicNames []*api.TopicResponse `json:"topics"` @@ -51,7 +52,7 @@ func TestAPITopicSearch(t *testing.T) { } func TestAPIRepoTopic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) // owner of repo2 user3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}) // owner of repo3 user4 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 4}) // write access to repo 3 diff --git a/integrations/api_settings_test.go b/tests/integration/api_settings_test.go similarity index 96% rename from integrations/api_settings_test.go rename to tests/integration/api_settings_test.go index 10318cec7ff9..b8da17b963a0 100644 --- a/integrations/api_settings_test.go +++ b/tests/integration/api_settings_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIExposedSettings(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() ui := new(api.GeneralUISettings) req := NewRequest(t, "GET", "/api/v1/settings/ui") diff --git a/integrations/api_team_test.go b/tests/integration/api_team_test.go similarity index 98% rename from integrations/api_team_test.go rename to tests/integration/api_team_test.go index 9ea7a6f78709..a667949c096f 100644 --- a/integrations/api_team_test.go +++ b/tests/integration/api_team_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -17,12 +17,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPITeam(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() teamUser := unittest.AssertExistsAndLoadBean(t, &organization.TeamUser{}) team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamUser.TeamID}) @@ -220,7 +221,7 @@ type TeamSearchResults struct { } func TestAPITeamSearch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) org := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 17}) @@ -244,7 +245,7 @@ func TestAPITeamSearch(t *testing.T) { } func TestAPIGetTeamRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 15}) teamRepo := unittest.AssertExistsAndLoadBean(t, &repo.Repository{ID: 24}) diff --git a/integrations/api_team_user_test.go b/tests/integration/api_team_user_test.go similarity index 94% rename from integrations/api_team_user_test.go rename to tests/integration/api_team_user_test.go index 9b3364b5b185..b999b97a2b6f 100644 --- a/integrations/api_team_user_test.go +++ b/tests/integration/api_team_user_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -13,12 +13,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPITeamUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() normalUsername := "user2" session := loginUser(t, normalUsername) diff --git a/integrations/api_token_test.go b/tests/integration/api_token_test.go similarity index 94% rename from integrations/api_token_test.go rename to tests/integration/api_token_test.go index 6ba4c26a79ab..023bf301797b 100644 --- a/integrations/api_token_test.go +++ b/tests/integration/api_token_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,11 +12,12 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" ) // TestAPICreateAndDeleteToken tests that token that was just created can be deleted func TestAPICreateAndDeleteToken(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) req := NewRequestWithJSON(t, "POST", "/api/v1/users/user1/tokens", map[string]string{ @@ -56,7 +57,7 @@ func TestAPICreateAndDeleteToken(t *testing.T) { // TestAPIDeleteMissingToken ensures that error is thrown when token not found func TestAPIDeleteMissingToken(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) req := NewRequestf(t, "DELETE", "/api/v1/users/user1/tokens/%d", unittest.NonexistentID) diff --git a/integrations/api_user_email_test.go b/tests/integration/api_user_email_test.go similarity index 94% rename from integrations/api_user_email_test.go rename to tests/integration/api_user_email_test.go index 08d236df30e5..7bd265187ca0 100644 --- a/integrations/api_user_email_test.go +++ b/tests/integration/api_user_email_test.go @@ -2,19 +2,20 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIListEmails(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() normalUsername := "user2" session := loginUser(t, normalUsername) @@ -41,7 +42,7 @@ func TestAPIListEmails(t *testing.T) { } func TestAPIAddEmail(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() normalUsername := "user2" session := loginUser(t, normalUsername) @@ -78,7 +79,7 @@ func TestAPIAddEmail(t *testing.T) { } func TestAPIDeleteEmail(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() normalUsername := "user2" session := loginUser(t, normalUsername) diff --git a/integrations/api_user_heatmap_test.go b/tests/integration/api_user_heatmap_test.go similarity index 92% rename from integrations/api_user_heatmap_test.go rename to tests/integration/api_user_heatmap_test.go index 6930507645d7..da6af0118ddc 100644 --- a/integrations/api_user_heatmap_test.go +++ b/tests/integration/api_user_heatmap_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file.package models -package integrations +package integration import ( "fmt" @@ -12,12 +12,13 @@ import ( activities_model "code.gitea.io/gitea/models/activities" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestUserHeatmap(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" token := getUserToken(t, adminUsername) diff --git a/integrations/api_user_org_perm_test.go b/tests/integration/api_user_org_perm_test.go similarity index 95% rename from integrations/api_user_org_perm_test.go rename to tests/integration/api_user_org_perm_test.go index f4047e72bee7..fef653545c5f 100644 --- a/integrations/api_user_org_perm_test.go +++ b/tests/integration/api_user_org_perm_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -10,6 +10,7 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -22,7 +23,7 @@ type apiUserOrgPermTestCase struct { } func TestTokenNeeded(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := emptyTestSession(t) req := NewRequest(t, "GET", "/api/v1/users/user1/orgs/user6/permissions") @@ -30,7 +31,7 @@ func TestTokenNeeded(t *testing.T) { } func sampleTest(t *testing.T, auoptc apiUserOrgPermTestCase) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, auoptc.LoginUser) token := getTokenForLoggedInUser(t, session) @@ -123,7 +124,7 @@ func TestCanReadUser(t *testing.T) { } func TestUnknowUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session) @@ -137,7 +138,7 @@ func TestUnknowUser(t *testing.T) { } func TestUnknowOrganization(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") token := getTokenForLoggedInUser(t, session) diff --git a/integrations/api_user_orgs_test.go b/tests/integration/api_user_orgs_test.go similarity index 96% rename from integrations/api_user_orgs_test.go rename to tests/integration/api_user_orgs_test.go index 1555b5339066..622dfdcf21e0 100644 --- a/integrations/api_user_orgs_test.go +++ b/tests/integration/api_user_orgs_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file.package models -package integrations +package integration import ( "fmt" @@ -12,12 +12,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestUserOrgs(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" privateMemberUsername := "user4" @@ -79,7 +80,7 @@ func getUserOrgs(t *testing.T, userDoer, userCheck string) (orgs []*api.Organiza } func TestMyOrgs(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := emptyTestSession(t) req := NewRequest(t, "GET", "/api/v1/user/orgs") diff --git a/integrations/api_user_search_test.go b/tests/integration/api_user_search_test.go similarity index 93% rename from integrations/api_user_search_test.go rename to tests/integration/api_user_search_test.go index dbaca24981a7..9e9276077b40 100644 --- a/integrations/api_user_search_test.go +++ b/tests/integration/api_user_search_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file.package models -package integrations +package integration import ( "fmt" @@ -13,6 +13,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -23,7 +24,7 @@ type SearchResults struct { } func TestAPIUserSearchLoggedIn(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" session := loginUser(t, adminUsername) token := getTokenForLoggedInUser(t, session) @@ -41,7 +42,7 @@ func TestAPIUserSearchLoggedIn(t *testing.T) { } func TestAPIUserSearchNotLoggedIn(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() query := "user2" req := NewRequestf(t, "GET", "/api/v1/users/search?q=%s", query) resp := MakeRequest(t, req, http.StatusOK) @@ -62,7 +63,7 @@ func TestAPIUserSearchNotLoggedIn(t *testing.T) { } func TestAPIUserSearchAdminLoggedInUserHidden(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminUsername := "user1" session := loginUser(t, adminUsername) token := getTokenForLoggedInUser(t, session) @@ -82,7 +83,7 @@ func TestAPIUserSearchAdminLoggedInUserHidden(t *testing.T) { } func TestAPIUserSearchNotLoggedInUserHidden(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() query := "user31" req := NewRequestf(t, "GET", "/api/v1/users/search?q=%s", query) resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/api_wiki_test.go b/tests/integration/api_wiki_test.go similarity index 96% rename from integrations/api_wiki_test.go rename to tests/integration/api_wiki_test.go index 3b768b94d80e..c6f4841d082e 100644 --- a/integrations/api_wiki_test.go +++ b/tests/integration/api_wiki_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "encoding/base64" @@ -11,12 +11,13 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestAPIGetWikiPage(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" session := loginUser(t, username) @@ -62,7 +63,7 @@ func TestAPIGetWikiPage(t *testing.T) { } func TestAPIListWikiPages(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" session := loginUser(t, username) @@ -178,7 +179,7 @@ func TestAPINewWikiPage(t *testing.T) { "New page", "&&&&", } { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" session := loginUser(t, username) token := getTokenForLoggedInUser(t, session) @@ -195,7 +196,7 @@ func TestAPINewWikiPage(t *testing.T) { } func TestAPIEditWikiPage(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" session := loginUser(t, username) token := getTokenForLoggedInUser(t, session) @@ -211,7 +212,7 @@ func TestAPIEditWikiPage(t *testing.T) { } func TestAPIListPageRevisions(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" session := loginUser(t, username) diff --git a/integrations/attachment_test.go b/tests/integration/attachment_test.go similarity index 96% rename from integrations/attachment_test.go rename to tests/integration/attachment_test.go index 00e5b9de543a..2d2c979f7b0a 100644 --- a/integrations/attachment_test.go +++ b/tests/integration/attachment_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -17,6 +17,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -57,13 +58,13 @@ func createAttachment(t *testing.T, session *TestSession, repoURL, filename stri } func TestCreateAnonymousAttachment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := emptyTestSession(t) createAttachment(t, session, "user2/repo1", "image.png", generateImg(), http.StatusSeeOther) } func TestCreateIssueAttachment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() const repoURL = "user2/repo1" session := loginUser(t, "user2") uuid := createAttachment(t, session, repoURL, "image.png", generateImg(), http.StatusOK) @@ -92,7 +93,7 @@ func TestCreateIssueAttachment(t *testing.T) { } func TestGetAttachment(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() adminSession := loginUser(t, "user1") user2Session := loginUser(t, "user2") user8Session := loginUser(t, "user8") diff --git a/integrations/auth_ldap_test.go b/tests/integration/auth_ldap_test.go similarity index 97% rename from integrations/auth_ldap_test.go rename to tests/integration/auth_ldap_test.go index 892ff3813401..f3c3e6d7b3e3 100644 --- a/integrations/auth_ldap_test.go +++ b/tests/integration/auth_ldap_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -18,6 +18,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/translation" "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -145,7 +146,7 @@ func TestLDAPUserSignin(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "") u := gitLDAPUsers[0] @@ -162,7 +163,7 @@ func TestLDAPUserSignin(t *testing.T) { } func TestLDAPAuthChange(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "") session := loginUser(t, "user1") @@ -220,7 +221,7 @@ func TestLDAPUserSync(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "") auth.SyncExternalUsers(context.Background(), true) @@ -271,7 +272,7 @@ func TestLDAPUserSigninFailed(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "") u := otherLDAPUsers[0] @@ -283,7 +284,7 @@ func TestLDAPUserSSHKeySync(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "sshPublicKey") auth.SyncExternalUsers(context.Background(), true) @@ -316,7 +317,7 @@ func TestLDAPGroupTeamSyncAddMember(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "", "on", `{"cn=ship_crew,ou=people,dc=planetexpress,dc=com":{"org26": ["team11"]},"cn=admin_staff,ou=people,dc=planetexpress,dc=com": {"non-existent": ["non-existent"]}}`) org, err := organization.GetOrgByName("org26") assert.NoError(t, err) @@ -361,7 +362,7 @@ func TestLDAPGroupTeamSyncRemoveMember(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "", "on", `{"cn=dispatch,ou=people,dc=planetexpress,dc=com": {"org26": ["team11"]}}`) org, err := organization.GetOrgByName("org26") assert.NoError(t, err) @@ -397,7 +398,7 @@ func TestBrokenLDAPMapUserSignin(t *testing.T) { t.Skip() return } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() addAuthSourceLDAP(t, "", "on", `{"NOT_A_VALID_JSON"["MISSING_DOUBLE_POINT"]}`) u := gitLDAPUsers[0] diff --git a/integrations/benchmarks_test.go b/tests/integration/benchmarks_test.go similarity index 99% rename from integrations/benchmarks_test.go rename to tests/integration/benchmarks_test.go index a63c36368330..bf66d221fb07 100644 --- a/integrations/benchmarks_test.go +++ b/tests/integration/benchmarks_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "math/rand" diff --git a/integrations/branches_test.go b/tests/integration/branches_test.go similarity index 94% rename from integrations/branches_test.go rename to tests/integration/branches_test.go index 8b05e24a04e7..bd0bd63c50a1 100644 --- a/integrations/branches_test.go +++ b/tests/integration/branches_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "testing" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestViewBranches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/branches") resp := MakeRequest(t, req, http.StatusOK) @@ -26,7 +27,7 @@ func TestViewBranches(t *testing.T) { } func TestDeleteBranch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() deleteBranch(t) } diff --git a/integrations/change_default_branch_test.go b/tests/integration/change_default_branch_test.go similarity index 93% rename from integrations/change_default_branch_test.go rename to tests/integration/change_default_branch_test.go index 6fe7305d4563..8edc0e63c438 100644 --- a/integrations/change_default_branch_test.go +++ b/tests/integration/change_default_branch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -12,10 +12,11 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" ) func TestChangeDefaultBranch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/integrations/cmd_keys_test.go b/tests/integration/cmd_keys_test.go similarity index 99% rename from integrations/cmd_keys_test.go rename to tests/integration/cmd_keys_test.go index 3d4194c33142..0c72956c2936 100644 --- a/integrations/cmd_keys_test.go +++ b/tests/integration/cmd_keys_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" diff --git a/integrations/compare_test.go b/tests/integration/compare_test.go similarity index 91% rename from integrations/compare_test.go rename to tests/integration/compare_test.go index 0fb2ae6c91f0..7642109dd957 100644 --- a/integrations/compare_test.go +++ b/tests/integration/compare_test.go @@ -2,18 +2,19 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "strings" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestCompareTag(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1...master") @@ -30,7 +31,7 @@ func TestCompareTag(t *testing.T) { // Compare with inferred default branch (master) func TestCompareDefault(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1") diff --git a/integrations/cors_test.go b/tests/integration/cors_test.go similarity index 88% rename from integrations/cors_test.go rename to tests/integration/cors_test.go index 466984c79a75..f5318016276f 100644 --- a/integrations/cors_test.go +++ b/tests/integration/cors_test.go @@ -2,17 +2,18 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestCORSNotSet(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestf(t, "GET", "/api/v1/version") session := loginUser(t, "user2") resp := session.MakeRequest(t, req, http.StatusOK) diff --git a/integrations/create_no_session_test.go b/tests/integration/create_no_session_test.go similarity index 95% rename from integrations/create_no_session_test.go rename to tests/integration/create_no_session_test.go index 017fe1d356ed..c9b90974d7b7 100644 --- a/integrations/create_no_session_test.go +++ b/tests/integration/create_no_session_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers" + "code.gitea.io/gitea/tests" "gitea.com/go-chi/session" "github.com/stretchr/testify/assert" @@ -53,7 +54,7 @@ func sessionFileExist(t *testing.T, tmpDir, sessionID string) bool { } func TestSessionFileCreation(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() oldSessionConfig := setting.SessionConfig.ProviderConfig defer func() { @@ -86,7 +87,7 @@ func TestSessionFileCreation(t *testing.T) { c = routers.NormalRoutes(context.TODO()) t.Run("NoSessionOnViewIssue", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", "/user2/repo1/issues/1") resp := MakeRequest(t, req, http.StatusOK) @@ -96,7 +97,7 @@ func TestSessionFileCreation(t *testing.T) { assert.False(t, sessionFileExist(t, tmpDir, sessionID)) }) t.Run("CreateSessionOnLogin", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() req := NewRequest(t, "GET", "/user/login") resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/csrf_test.go b/tests/integration/csrf_test.go similarity index 95% rename from integrations/csrf_test.go rename to tests/integration/csrf_test.go index 2c61f954269c..18a157412b23 100644 --- a/integrations/csrf_test.go +++ b/tests/integration/csrf_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,12 +12,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestCsrfProtection(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // test web form csrf via form user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) diff --git a/integrations/delete_user_test.go b/tests/integration/delete_user_test.go similarity index 94% rename from integrations/delete_user_test.go rename to tests/integration/delete_user_test.go index 8b8678022433..1d9d257f123e 100644 --- a/integrations/delete_user_test.go +++ b/tests/integration/delete_user_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,6 +15,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" ) func assertUserDeleted(t *testing.T, userID int64) { @@ -30,7 +31,7 @@ func assertUserDeleted(t *testing.T, userID int64) { } func TestUserDeleteAccount(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user8") csrf := GetCSRF(t, session, "/user/settings/account") @@ -45,7 +46,7 @@ func TestUserDeleteAccount(t *testing.T) { } func TestUserDeleteAccountStillOwnRepos(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") csrf := GetCSRF(t, session, "/user/settings/account") diff --git a/integrations/download_test.go b/tests/integration/download_test.go similarity index 91% rename from integrations/download_test.go rename to tests/integration/download_test.go index f46122d95108..9d3b17d10363 100644 --- a/integrations/download_test.go +++ b/tests/integration/download_test.go @@ -2,19 +2,20 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestDownloadByID(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -26,7 +27,7 @@ func TestDownloadByID(t *testing.T) { } func TestDownloadByIDForSVGUsesSecureHeaders(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -40,7 +41,7 @@ func TestDownloadByIDForSVGUsesSecureHeaders(t *testing.T) { } func TestDownloadByIDMedia(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -52,7 +53,7 @@ func TestDownloadByIDMedia(t *testing.T) { } func TestDownloadByIDMediaForSVGUsesSecureHeaders(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -66,7 +67,7 @@ func TestDownloadByIDMediaForSVGUsesSecureHeaders(t *testing.T) { } func TestDownloadRawTextFileWithoutMimeTypeMapping(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -77,7 +78,7 @@ func TestDownloadRawTextFileWithoutMimeTypeMapping(t *testing.T) { } func TestDownloadRawTextFileWithMimeTypeMapping(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.MimeTypeMap.Map[".xml"] = "text/xml" setting.MimeTypeMap.Enabled = true diff --git a/integrations/dump_restore_test.go b/tests/integration/dump_restore_test.go similarity index 99% rename from integrations/dump_restore_test.go rename to tests/integration/dump_restore_test.go index 7395bd5bd9a7..19513d0271e1 100644 --- a/integrations/dump_restore_test.go +++ b/tests/integration/dump_restore_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" diff --git a/integrations/editor_test.go b/tests/integration/editor_test.go similarity index 99% rename from integrations/editor_test.go rename to tests/integration/editor_test.go index c6c5ab2f6185..19e80dc7bfd9 100644 --- a/integrations/editor_test.go +++ b/tests/integration/editor_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/empty_repo_test.go b/tests/integration/empty_repo_test.go similarity index 91% rename from integrations/empty_repo_test.go rename to tests/integration/empty_repo_test.go index daf153a183b7..8810363dc862 100644 --- a/integrations/empty_repo_test.go +++ b/tests/integration/empty_repo_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,10 +11,11 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" ) func TestEmptyRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() subpaths := []string{ "commits/master", "raw/foo", diff --git a/integrations/eventsource_test.go b/tests/integration/eventsource_test.go similarity index 96% rename from integrations/eventsource_test.go rename to tests/integration/eventsource_test.go index 4bb607cde40d..cd496e01292b 100644 --- a/integrations/eventsource_test.go +++ b/tests/integration/eventsource_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -16,12 +16,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/eventsource" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestEventSourceManagerRun(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() manager := eventsource.GetManager() eventChan := manager.Register(2) diff --git a/integrations/explore_repos_test.go b/tests/integration/explore_repos_test.go similarity index 79% rename from integrations/explore_repos_test.go rename to tests/integration/explore_repos_test.go index c6f695612a82..dca32527539e 100644 --- a/integrations/explore_repos_test.go +++ b/tests/integration/explore_repos_test.go @@ -2,15 +2,17 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + + "code.gitea.io/gitea/tests" ) func TestExploreRepos(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/explore/repos") MakeRequest(t, req, http.StatusOK) diff --git a/integrations/git_clone_wiki_test.go b/tests/integration/git_clone_wiki_test.go similarity index 94% rename from integrations/git_clone_wiki_test.go rename to tests/integration/git_clone_wiki_test.go index a73174f6aaae..4bdbc9b7c344 100644 --- a/integrations/git_clone_wiki_test.go +++ b/tests/integration/git_clone_wiki_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -32,7 +33,7 @@ func assertFileEqual(t *testing.T, p string, content []byte) { func TestRepoCloneWiki(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() dstPath, err := os.MkdirTemp("", "clone_wiki") assert.NoError(t, err) diff --git a/integrations/git_helper_for_declarative_test.go b/tests/integration/git_helper_for_declarative_test.go similarity index 98% rename from integrations/git_helper_for_declarative_test.go rename to tests/integration/git_helper_for_declarative_test.go index 1ea594b739c8..666f9f6fe946 100644 --- a/integrations/git_helper_for_declarative_test.go +++ b/tests/integration/git_helper_for_declarative_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -21,6 +21,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/ssh" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -61,7 +62,7 @@ func createSSHUrl(gitPath string, u *url.URL) *url.URL { func onGiteaRunTB(t testing.TB, callback func(testing.TB, *url.URL), prepare ...bool) { if len(prepare) == 0 || prepare[0] { - defer prepareTestEnv(t, 1)() + defer tests.PrepareTestEnv(t, 1)() } s := http.Server{ Handler: c, diff --git a/integrations/git_smart_http_test.go b/tests/integration/git_smart_http_test.go similarity index 98% rename from integrations/git_smart_http_test.go rename to tests/integration/git_smart_http_test.go index a6baafe374ed..02b0e938704f 100644 --- a/integrations/git_smart_http_test.go +++ b/tests/integration/git_smart_http_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "io" diff --git a/integrations/git_test.go b/tests/integration/git_test.go similarity index 97% rename from integrations/git_test.go rename to tests/integration/git_test.go index 9018374514c6..caeb5db8b3b3 100644 --- a/integrations/git_test.go +++ b/tests/integration/git_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "encoding/hex" @@ -28,6 +28,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -50,7 +51,7 @@ func testGit(t *testing.T, u *url.URL) { forkedUserCtx := NewAPITestContext(t, "user4", "repo1") t.Run("HTTP", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() ensureAnonymousClone(t, u) httpContext := baseAPITestContext httpContext.Reponame = "repo-tmp-17" @@ -86,7 +87,7 @@ func testGit(t *testing.T, u *url.URL) { t.Run("AutoMerge", doAutoPRMerge(&httpContext, dstPath)) t.Run("CreatePRAndSetManuallyMerged", doCreatePRAndSetManuallyMerged(httpContext, httpContext, dstPath, "master", "test-manually-merge")) t.Run("MergeFork", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("CreatePRAndMerge", doMergeFork(httpContext, forkedUserCtx, "master", httpContext.Username+":master")) rawTest(t, &forkedUserCtx, little, big, littleLFS, bigLFS) mediaTest(t, &forkedUserCtx, little, big, littleLFS, bigLFS) @@ -95,7 +96,7 @@ func testGit(t *testing.T, u *url.URL) { t.Run("PushCreate", doPushCreate(httpContext, u)) }) t.Run("SSH", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() sshContext := baseAPITestContext sshContext.Reponame = "repo-tmp-18" keyname := "my-testing-key" @@ -127,7 +128,7 @@ func testGit(t *testing.T, u *url.URL) { t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &sshContext, "master", "test/head2")) t.Run("BranchProtectMerge", doBranchProtectPRMerge(&sshContext, dstPath)) t.Run("MergeFork", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("CreatePRAndMerge", doMergeFork(sshContext, forkedUserCtx, "master", sshContext.Username+":master")) rawTest(t, &forkedUserCtx, little, big, littleLFS, bigLFS) mediaTest(t, &forkedUserCtx, little, big, littleLFS, bigLFS) @@ -147,7 +148,7 @@ func ensureAnonymousClone(t *testing.T, u *url.URL) { func standardCommitAndPushTest(t *testing.T, dstPath string) (little, big string) { t.Run("Standard", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() little, big = commitAndPushTest(t, dstPath, "data-file-") }) return little, big @@ -155,7 +156,7 @@ func standardCommitAndPushTest(t *testing.T, dstPath string) (little, big string func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS string) { t.Run("LFS", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() prefix := "lfs-data-file-" err := git.NewCommand(git.DefaultContext, "lfs").AddArguments("install").Run(&git.RunOpts{Dir: dstPath}) assert.NoError(t, err) @@ -182,7 +183,7 @@ func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS strin littleLFS, bigLFS = commitAndPushTest(t, dstPath, prefix) t.Run("Locks", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() lockTest(t, dstPath) }) }) @@ -191,9 +192,9 @@ func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS strin func commitAndPushTest(t *testing.T, dstPath, prefix string) (little, big string) { t.Run("PushCommit", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("Little", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() little = doCommitAndPush(t, littleSize, dstPath, prefix) }) t.Run("Big", func(t *testing.T) { @@ -201,7 +202,7 @@ func commitAndPushTest(t *testing.T, dstPath, prefix string) (little, big string t.Skip("Skipping test in short mode.") return } - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() big = doCommitAndPush(t, bigSize, dstPath, prefix) }) }) @@ -210,7 +211,7 @@ func commitAndPushTest(t *testing.T, dstPath, prefix string) (little, big string func rawTest(t *testing.T, ctx *APITestContext, little, big, littleLFS, bigLFS string) { t.Run("Raw", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() username := ctx.Username reponame := ctx.Reponame @@ -250,7 +251,7 @@ func rawTest(t *testing.T, ctx *APITestContext, little, big, littleLFS, bigLFS s func mediaTest(t *testing.T, ctx *APITestContext, little, big, littleLFS, bigLFS string) { t.Run("Media", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() username := ctx.Username reponame := ctx.Reponame @@ -362,7 +363,7 @@ func generateCommitWithNewData(size int, repoPath, email, fullName, prefix strin func doBranchProtectPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() t.Run("CreateBranchProtected", doGitCreateBranch(dstPath, "protected")) t.Run("PushProtectedBranch", doGitPushTestRepository(dstPath, "origin", "protected")) @@ -452,7 +453,7 @@ func doProtectBranch(ctx APITestContext, branch, userToWhitelist, unprotectedFil func doMergeFork(ctx, baseCtx APITestContext, baseBranch, headBranch string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() var pr api.PullRequest var err error @@ -500,7 +501,7 @@ func doMergeFork(ctx, baseCtx APITestContext, baseBranch, headBranch string) fun func doCreatePRAndSetManuallyMerged(ctx, baseCtx APITestContext, dstPath, baseBranch, headBranch string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() var ( pr api.PullRequest err error @@ -552,7 +553,7 @@ func doEnsureDiffNoChange(ctx APITestContext, pr api.PullRequest, diffHash strin func doPushCreate(ctx APITestContext, u *url.URL) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() // create a context for a currently non-existent repository ctx.Reponame = fmt.Sprintf("repo-tmp-push-create-%s", u.Scheme) @@ -610,7 +611,7 @@ func doBranchDelete(ctx APITestContext, owner, repo, branch string) func(*testin func doAutoPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() ctx := NewAPITestContext(t, baseCtx.Username, baseCtx.Reponame) @@ -692,7 +693,7 @@ func doAutoPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) { func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, baseBranch, headBranch string) func(t *testing.T) { return func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() // skip this test if git version is low if git.CheckGitVersionAtLeast("2.29") != nil { diff --git a/integrations/goget_test.go b/tests/integration/goget_test.go similarity index 91% rename from integrations/goget_test.go rename to tests/integration/goget_test.go index 504d869990fb..c969f4aff10c 100644 --- a/integrations/goget_test.go +++ b/tests/integration/goget_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -10,12 +10,13 @@ import ( "testing" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestGoGet(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/blah/glah/plah?go-get=1") resp := MakeRequest(t, req, http.StatusOK) diff --git a/integrations/gpg_git_test.go b/tests/integration/gpg_git_test.go similarity index 94% rename from integrations/gpg_git_test.go rename to tests/integration/gpg_git_test.go index 6edce606f2ba..2e16d150c8f0 100644 --- a/integrations/gpg_git_test.go +++ b/tests/integration/gpg_git_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "encoding/base64" @@ -17,6 +17,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" "golang.org/x/crypto/openpgp" @@ -24,7 +25,7 @@ import ( ) func TestGPGGit(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() username := "user2" // OK Set a new GPG home @@ -71,7 +72,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchUnsigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { @@ -95,7 +96,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( t, testCtx, user, "master", "parentsigned", "signed-parent.txt", func(t *testing.T, response api.FileResponse) { @@ -112,7 +113,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial-CRUD-Never", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") t.Run("CreateCRUDFile-Never", crudActionCreateFile( t, testCtx, user, "parentsigned", "parentsigned-never", "unsigned-never2.txt", func(t *testing.T, response api.FileResponse) { @@ -125,7 +126,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial-CRUD-Always", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") t.Run("CreateCRUDFile-Always", crudActionCreateFile( t, testCtx, user, "master", "always", "signed-always.txt", func(t *testing.T, response api.FileResponse) { @@ -162,7 +163,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("Unsigned-Initial-CRUD-ParentSigned", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") t.Run("CreateCRUDFile-Always-ParentSigned", crudActionCreateFile( t, testCtx, user, "always", "always-parentsigned", "signed-always-parentsigned.txt", func(t *testing.T, response api.FileResponse) { @@ -185,7 +186,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("AlwaysSign-Initial", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-always") t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CheckMasterBranchSigned", doAPIGetBranch(testCtx, "master", func(t *testing.T, branch api.Branch) { @@ -213,7 +214,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("AlwaysSign-Initial-CRUD-Never", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-always-never") t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Never", crudActionCreateFile( @@ -226,7 +227,7 @@ func TestGPGGit(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { u.Path = baseAPITestContext.GitPath() t.Run("AlwaysSign-Initial-CRUD-ParentSigned-On-Always", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-always-parent") t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-ParentSigned", crudActionCreateFile( @@ -245,7 +246,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("AlwaysSign-Initial-CRUD-Always", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-always-always") t.Run("CreateRepository", doAPICreateRepository(testCtx, false)) t.Run("CreateCRUDFile-Always", crudActionCreateFile( @@ -265,7 +266,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("UnsignedMerging", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") var err error t.Run("CreatePullRequest", func(t *testing.T) { @@ -286,7 +287,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("BaseSignedMerging", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") var err error t.Run("CreatePullRequest", func(t *testing.T) { @@ -307,7 +308,7 @@ func TestGPGGit(t *testing.T) { u.Path = baseAPITestContext.GitPath() t.Run("CommitsSignedMerging", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() testCtx := NewAPITestContext(t, username, "initial-unsigned") var err error t.Run("CreatePullRequest", func(t *testing.T) { @@ -344,10 +345,10 @@ func crudActionCreateFile(t *testing.T, ctx APITestContext, user *user_model.Use } func importTestingKey(tmpDir, name, email string) (*openpgp.Entity, error) { - if _, _, err := process.GetManager().Exec("gpg --import integrations/private-testing.key", "gpg", "--import", "integrations/private-testing.key"); err != nil { + if _, _, err := process.GetManager().Exec("gpg --import tests/integration/private-testing.key", "gpg", "--import", "tests/integration/private-testing.key"); err != nil { return nil, err } - keyringFile, err := os.Open("integrations/private-testing.key") + keyringFile, err := os.Open("tests/integration/private-testing.key") if err != nil { return nil, err } diff --git a/integrations/html_helper.go b/tests/integration/html_helper.go similarity index 98% rename from integrations/html_helper.go rename to tests/integration/html_helper.go index 001fc9a05b26..35d61f7b3e28 100644 --- a/integrations/html_helper.go +++ b/tests/integration/html_helper.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" diff --git a/integrations/integration_test.go b/tests/integration/integration_test.go similarity index 58% rename from integrations/integration_test.go rename to tests/integration/integration_test.go index a506c6a82524..8fc8a854a70d 100644 --- a/integrations/integration_test.go +++ b/tests/integration/integration_test.go @@ -2,12 +2,11 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" "context" - "database/sql" "fmt" "hash" "hash/fnv" @@ -17,26 +16,20 @@ import ( "net/http/httptest" "net/url" "os" - "path" "path/filepath" - "runtime" "strings" "testing" "time" "code.gitea.io/gitea/models/unittest" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/queue" - repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers" + "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" @@ -88,27 +81,27 @@ func TestMain(m *testing.M) { graceful.InitManager(managerCtx) defer cancel() - initIntegrationTest() + tests.InitTest(true) c = routers.NormalRoutes(context.TODO()) // integration test settings... if setting.Cfg != nil { testingCfg := setting.Cfg.Section("integration-tests") - slowTest = testingCfg.Key("SLOW_TEST").MustDuration(slowTest) - slowFlush = testingCfg.Key("SLOW_FLUSH").MustDuration(slowFlush) + tests.SlowTest = testingCfg.Key("SLOW_TEST").MustDuration(tests.SlowTest) + tests.SlowFlush = testingCfg.Key("SLOW_FLUSH").MustDuration(tests.SlowFlush) } if os.Getenv("GITEA_SLOW_TEST_TIME") != "" { duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_TEST_TIME")) if err == nil { - slowTest = duration + tests.SlowTest = duration } } if os.Getenv("GITEA_SLOW_FLUSH_TIME") != "" { duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_FLUSH_TIME")) if err == nil { - slowFlush = duration + tests.SlowFlush = duration } } @@ -130,7 +123,7 @@ func TestMain(m *testing.M) { } exitCode := m.Run() - writerCloser.Reset() + tests.WriterCloser.Reset() if err = util.RemoveAll(setting.Indexer.IssuePath); err != nil { fmt.Printf("util.RemoveAll: %v\n", err) @@ -144,169 +137,6 @@ func TestMain(m *testing.M) { os.Exit(exitCode) } -func initIntegrationTest() { - giteaRoot := base.SetupGiteaRoot() - if giteaRoot == "" { - fmt.Println("Environment variable $GITEA_ROOT not set") - os.Exit(1) - } - giteaBinary := "gitea" - if runtime.GOOS == "windows" { - giteaBinary += ".exe" - } - setting.AppPath = path.Join(giteaRoot, giteaBinary) - if _, err := os.Stat(setting.AppPath); err != nil { - fmt.Printf("Could not find gitea binary at %s\n", setting.AppPath) - os.Exit(1) - } - - giteaConf := os.Getenv("GITEA_CONF") - if giteaConf == "" { - fmt.Println("Environment variable $GITEA_CONF not set") - os.Exit(1) - } else if !path.IsAbs(giteaConf) { - setting.CustomConf = path.Join(giteaRoot, giteaConf) - } else { - setting.CustomConf = giteaConf - } - - setting.SetCustomPathAndConf("", "", "") - setting.LoadForTest() - setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master" - _ = util.RemoveAll(repo_module.LocalCopyPath()) - - if err := git.InitFull(context.Background()); err != nil { - log.Fatal("git.InitOnceWithSync: %v", err) - } - - setting.InitDBConfig() - if err := storage.Init(); err != nil { - fmt.Printf("Init storage failed: %v", err) - os.Exit(1) - } - - switch { - case setting.Database.UseMySQL: - connType := "tcp" - if len(setting.Database.Host) > 0 && setting.Database.Host[0] == '/' { // looks like a unix socket - connType = "unix" - } - - db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@%s(%s)/", - setting.Database.User, setting.Database.Passwd, connType, setting.Database.Host)) - defer db.Close() - if err != nil { - log.Fatal("sql.Open: %v", err) - } - if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s", setting.Database.Name)); err != nil { - log.Fatal("db.Exec: %v", err) - } - case setting.Database.UsePostgreSQL: - var db *sql.DB - var err error - if setting.Database.Host[0] == '/' { - db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", - setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) - } else { - db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", - setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) - } - - defer db.Close() - if err != nil { - log.Fatal("sql.Open: %v", err) - } - dbrows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'", setting.Database.Name)) - if err != nil { - log.Fatal("db.Query: %v", err) - } - defer dbrows.Close() - - if !dbrows.Next() { - if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE %s", setting.Database.Name)); err != nil { - log.Fatal("db.Exec: CREATE DATABASE: %v", err) - } - } - // Check if we need to setup a specific schema - if len(setting.Database.Schema) == 0 { - break - } - db.Close() - - if setting.Database.Host[0] == '/' { - db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", - setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) - } else { - db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", - setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) - } - // This is a different db object; requires a different Close() - defer db.Close() - if err != nil { - log.Fatal("sql.Open: %v", err) - } - schrows, err := db.Query(fmt.Sprintf("SELECT 1 FROM information_schema.schemata WHERE schema_name = '%s'", setting.Database.Schema)) - if err != nil { - log.Fatal("db.Query: %v", err) - } - defer schrows.Close() - - if !schrows.Next() { - // Create and setup a DB schema - if _, err = db.Exec(fmt.Sprintf("CREATE SCHEMA %s", setting.Database.Schema)); err != nil { - log.Fatal("db.Exec: CREATE SCHEMA: %v", err) - } - } - - case setting.Database.UseMSSQL: - host, port := setting.ParseMSSQLHostPort(setting.Database.Host) - db, err := sql.Open("mssql", fmt.Sprintf("server=%s; port=%s; database=%s; user id=%s; password=%s;", - host, port, "master", setting.Database.User, setting.Database.Passwd)) - if err != nil { - log.Fatal("sql.Open: %v", err) - } - if _, err := db.Exec(fmt.Sprintf("If(db_id(N'%s') IS NULL) BEGIN CREATE DATABASE %s; END;", setting.Database.Name, setting.Database.Name)); err != nil { - log.Fatal("db.Exec: %v", err) - } - defer db.Close() - } - - routers.GlobalInitInstalled(graceful.GetManager().HammerContext()) -} - -func prepareTestEnv(t testing.TB, skip ...int) func() { - t.Helper() - ourSkip := 2 - if len(skip) > 0 { - ourSkip += skip[0] - } - deferFn := PrintCurrentTest(t, ourSkip) - assert.NoError(t, unittest.LoadFixtures()) - assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) - assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath)) - ownerDirs, err := os.ReadDir(setting.RepoRootPath) - if err != nil { - assert.NoError(t, err, "unable to read the new repo root: %v\n", err) - } - for _, ownerDir := range ownerDirs { - if !ownerDir.Type().IsDir() { - continue - } - repoDirs, err := os.ReadDir(filepath.Join(setting.RepoRootPath, ownerDir.Name())) - if err != nil { - assert.NoError(t, err, "unable to read the new repo root: %v\n", err) - } - for _, repoDir := range repoDirs { - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "pack"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "info"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "heads"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "tag"), 0o755) - } - } - - return deferFn -} - type TestSession struct { jar http.CookieJar } @@ -575,32 +405,3 @@ func GetCSRF(t testing.TB, session *TestSession, urlStr string) string { doc := NewHTMLParser(t, resp.Body) return doc.GetCSRF() } - -// resetFixtures flushes queues, reloads fixtures and resets test repositories within a single test. -// Most tests should call defer prepareTestEnv(t)() (or have onGiteaRun do that for them) but sometimes -// within a single test this is required -func resetFixtures(t *testing.T) { - assert.NoError(t, queue.GetManager().FlushAll(context.Background(), -1)) - assert.NoError(t, unittest.LoadFixtures()) - assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) - assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath)) - ownerDirs, err := os.ReadDir(setting.RepoRootPath) - if err != nil { - assert.NoError(t, err, "unable to read the new repo root: %v\n", err) - } - for _, ownerDir := range ownerDirs { - if !ownerDir.Type().IsDir() { - continue - } - repoDirs, err := os.ReadDir(filepath.Join(setting.RepoRootPath, ownerDir.Name())) - if err != nil { - assert.NoError(t, err, "unable to read the new repo root: %v\n", err) - } - for _, repoDir := range repoDirs { - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "pack"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "info"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "heads"), 0o755) - _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "tag"), 0o755) - } - } -} diff --git a/integrations/issue_test.go b/tests/integration/issue_test.go similarity index 97% rename from integrations/issue_test.go rename to tests/integration/issue_test.go index 4bbb4744eae9..1f0f894ca42c 100644 --- a/integrations/issue_test.go +++ b/tests/integration/issue_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -24,6 +24,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" @@ -57,14 +58,14 @@ func assertMatch(t testing.TB, issue *issues_model.Issue, keyword string) { } func TestNoLoginViewIssues(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/issues") MakeRequest(t, req, http.StatusOK) } func TestViewIssuesSortByType(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -92,7 +93,7 @@ func TestViewIssuesSortByType(t *testing.T) { } func TestViewIssuesKeyword(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ @@ -117,7 +118,7 @@ func TestViewIssuesKeyword(t *testing.T) { } func TestNoLoginViewIssue(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/issues/1") MakeRequest(t, req, http.StatusOK) @@ -184,13 +185,13 @@ func testIssueAddComment(t *testing.T, session *TestSession, issueURL, content, } func TestNewIssue(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testNewIssue(t, session, "user2", "repo1", "Title", "Description") } func TestIssueCommentClose(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") issueURL := testNewIssue(t, session, "user2", "repo1", "Title", "Description") testIssueAddComment(t, session, issueURL, "Test comment 1", "") @@ -206,7 +207,7 @@ func TestIssueCommentClose(t *testing.T) { } func TestIssueReaction(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") issueURL := testNewIssue(t, session, "user2", "repo1", "Title", "Description") @@ -232,7 +233,7 @@ func TestIssueReaction(t *testing.T) { } func TestIssueCrossReference(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // Issue that will be referenced _, issueBase := testIssueWithBean(t, "user2", 1, "Title", "Description") @@ -332,7 +333,7 @@ func testIssueChangeInfo(t *testing.T, user, issueURL, info, value string) { } func TestIssueRedirect(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") // Test external tracker where style not set (shall default numeric) @@ -352,7 +353,7 @@ func TestIssueRedirect(t *testing.T) { } func TestSearchIssues(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -448,7 +449,7 @@ func TestSearchIssues(t *testing.T) { } func TestSearchIssuesWithLabels(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() expectedIssueCount := 15 // from the fixtures if expectedIssueCount > setting.UI.IssuePagingNum { @@ -508,7 +509,7 @@ func TestSearchIssuesWithLabels(t *testing.T) { } func TestGetIssueInfo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 10}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issue.RepoID}) @@ -529,7 +530,7 @@ func TestGetIssueInfo(t *testing.T) { } func TestUpdateIssueDeadline(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() issueBefore := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 10}) repoBefore := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: issueBefore.RepoID}) diff --git a/integrations/lfs_getobject_test.go b/tests/integration/lfs_getobject_test.go similarity index 95% rename from integrations/lfs_getobject_test.go rename to tests/integration/lfs_getobject_test.go index 14a8ac253e2c..f2b0ac80c3ed 100644 --- a/integrations/lfs_getobject_test.go +++ b/tests/integration/lfs_getobject_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "archive/zip" @@ -18,6 +18,7 @@ import ( "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/routers/web" + "code.gitea.io/gitea/tests" gzipp "github.com/klauspost/compress/gzip" "github.com/stretchr/testify/assert" @@ -81,7 +82,7 @@ func checkResponseTestContentEncoding(t *testing.T, content *[]byte, resp *httpt } func TestGetLFSSmall(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() content := []byte("A very small file\n") resp := storeAndGetLfs(t, &content, nil, http.StatusOK) @@ -89,7 +90,7 @@ func TestGetLFSSmall(t *testing.T) { } func TestGetLFSLarge(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() content := make([]byte, web.GzipMinSize*10) for i := range content { content[i] = byte(i % 256) @@ -100,7 +101,7 @@ func TestGetLFSLarge(t *testing.T) { } func TestGetLFSGzip(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() b := make([]byte, web.GzipMinSize*10) for i := range b { b[i] = byte(i % 256) @@ -116,7 +117,7 @@ func TestGetLFSGzip(t *testing.T) { } func TestGetLFSZip(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() b := make([]byte, web.GzipMinSize*10) for i := range b { b[i] = byte(i % 256) @@ -134,7 +135,7 @@ func TestGetLFSZip(t *testing.T) { } func TestGetLFSRangeNo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() content := []byte("123456789\n") resp := storeAndGetLfs(t, &content, nil, http.StatusOK) @@ -142,7 +143,7 @@ func TestGetLFSRangeNo(t *testing.T) { } func TestGetLFSRange(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() content := []byte("123456789\n") tests := []struct { diff --git a/integrations/lfs_local_endpoint_test.go b/tests/integration/lfs_local_endpoint_test.go similarity index 96% rename from integrations/lfs_local_endpoint_test.go rename to tests/integration/lfs_local_endpoint_test.go index 9de0ec18c90d..88c08c63dbee 100644 --- a/integrations/lfs_local_endpoint_test.go +++ b/tests/integration/lfs_local_endpoint_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -12,6 +12,7 @@ import ( "testing" "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -22,7 +23,7 @@ func str2url(raw string) *url.URL { } func TestDetermineLocalEndpoint(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() root, _ := os.MkdirTemp("", "lfs_test") defer os.RemoveAll(root) diff --git a/integrations/links_test.go b/tests/integration/links_test.go similarity index 96% rename from integrations/links_test.go rename to tests/integration/links_test.go index d0cf978f6545..4eb29f0cee7a 100644 --- a/integrations/links_test.go +++ b/tests/integration/links_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,12 +13,13 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestLinksNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() links := []string{ "/explore/repos", @@ -47,7 +48,7 @@ func TestLinksNoLogin(t *testing.T) { } func TestRedirectsNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() redirects := map[string]string{ "/user2/repo1/commits/master": "/user2/repo1/commits/branch/master", @@ -65,7 +66,7 @@ func TestRedirectsNoLogin(t *testing.T) { } func TestNoLoginNotExist(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() links := []string{ "/user5/repo4/projects", @@ -169,7 +170,7 @@ func testLinksAsUser(userName string, t *testing.T) { } func TestLinksLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testLinksAsUser("user2", t) } diff --git a/integrations/migrate_test.go b/tests/integration/migrate_test.go similarity index 99% rename from integrations/migrate_test.go rename to tests/integration/migrate_test.go index d16f74ab6df2..0fe401434436 100644 --- a/integrations/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/migration-test/gitea-v1.6.4.mssql.sql.gz b/tests/integration/migration-test/gitea-v1.6.4.mssql.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.6.4.mssql.sql.gz rename to tests/integration/migration-test/gitea-v1.6.4.mssql.sql.gz diff --git a/integrations/migration-test/gitea-v1.6.4.mysql.sql.gz b/tests/integration/migration-test/gitea-v1.6.4.mysql.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.6.4.mysql.sql.gz rename to tests/integration/migration-test/gitea-v1.6.4.mysql.sql.gz diff --git a/integrations/migration-test/gitea-v1.6.4.postgres.sql.gz b/tests/integration/migration-test/gitea-v1.6.4.postgres.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.6.4.postgres.sql.gz rename to tests/integration/migration-test/gitea-v1.6.4.postgres.sql.gz diff --git a/integrations/migration-test/gitea-v1.6.4.sqlite3.sql.gz b/tests/integration/migration-test/gitea-v1.6.4.sqlite3.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.6.4.sqlite3.sql.gz rename to tests/integration/migration-test/gitea-v1.6.4.sqlite3.sql.gz diff --git a/integrations/migration-test/gitea-v1.7.0.mssql.sql.gz b/tests/integration/migration-test/gitea-v1.7.0.mssql.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.7.0.mssql.sql.gz rename to tests/integration/migration-test/gitea-v1.7.0.mssql.sql.gz diff --git a/integrations/migration-test/gitea-v1.7.0.mysql.sql.gz b/tests/integration/migration-test/gitea-v1.7.0.mysql.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.7.0.mysql.sql.gz rename to tests/integration/migration-test/gitea-v1.7.0.mysql.sql.gz diff --git a/integrations/migration-test/gitea-v1.7.0.postgres.sql.gz b/tests/integration/migration-test/gitea-v1.7.0.postgres.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.7.0.postgres.sql.gz rename to tests/integration/migration-test/gitea-v1.7.0.postgres.sql.gz diff --git a/integrations/migration-test/gitea-v1.7.0.sqlite3.sql.gz b/tests/integration/migration-test/gitea-v1.7.0.sqlite3.sql.gz similarity index 100% rename from integrations/migration-test/gitea-v1.7.0.sqlite3.sql.gz rename to tests/integration/migration-test/gitea-v1.7.0.sqlite3.sql.gz diff --git a/integrations/migration-test/migration_test.go b/tests/integration/migration-test/migration_test.go similarity index 90% rename from integrations/migration-test/migration_test.go rename to tests/integration/migration-test/migration_test.go index 80093d66f1ed..b631168340a7 100644 --- a/integrations/migration-test/migration_test.go +++ b/tests/integration/migration-test/migration_test.go @@ -18,7 +18,6 @@ import ( "strings" "testing" - "code.gitea.io/gitea/integrations" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/models/unittest" @@ -27,6 +26,7 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" "xorm.io/xorm" @@ -35,21 +35,21 @@ import ( var currentEngine *xorm.Engine func initMigrationTest(t *testing.T) func() { - deferFn := integrations.PrintCurrentTest(t, 2) + deferFn := tests.PrintCurrentTest(t, 2) giteaRoot := base.SetupGiteaRoot() if giteaRoot == "" { - integrations.Printf("Environment variable $GITEA_ROOT not set\n") + tests.Printf("Environment variable $GITEA_ROOT not set\n") os.Exit(1) } setting.AppPath = path.Join(giteaRoot, "gitea") if _, err := os.Stat(setting.AppPath); err != nil { - integrations.Printf("Could not find gitea binary at %s\n", setting.AppPath) + tests.Printf("Could not find gitea binary at %s\n", setting.AppPath) os.Exit(1) } giteaConf := os.Getenv("GITEA_CONF") if giteaConf == "" { - integrations.Printf("Environment variable $GITEA_CONF not set\n") + tests.Printf("Environment variable $GITEA_CONF not set\n") os.Exit(1) } else if !path.IsAbs(giteaConf) { setting.CustomConf = path.Join(giteaRoot, giteaConf) @@ -61,7 +61,7 @@ func initMigrationTest(t *testing.T) func() { assert.True(t, len(setting.RepoRootPath) != 0) assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) - assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath)) + assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath)) ownerDirs, err := os.ReadDir(setting.RepoRootPath) if err != nil { assert.NoError(t, err, "unable to read the new repo root: %v\n", err) @@ -89,7 +89,7 @@ func initMigrationTest(t *testing.T) func() { } func availableVersions() ([]string, error) { - migrationsDir, err := os.Open("integrations/migration-test") + migrationsDir, err := os.Open("tests/integration/migration-test") if err != nil { return nil, err } @@ -115,7 +115,7 @@ func availableVersions() ([]string, error) { } func readSQLFromFile(version string) (string, error) { - filename := fmt.Sprintf("integrations/migration-test/gitea-v%s.%s.sql.gz", version, setting.Database.Type) + filename := fmt.Sprintf("tests/integration/migration-test/gitea-v%s.%s.sql.gz", version, setting.Database.Type) if _, err := os.Stat(filename); os.IsNotExist(err) { return "", nil @@ -144,7 +144,7 @@ func restoreOldDB(t *testing.T, version string) bool { data, err := readSQLFromFile(version) assert.NoError(t, err) if len(data) == 0 { - integrations.Printf("No db found to restore for %s version: %s\n", setting.Database.Type, version) + tests.Printf("No db found to restore for %s version: %s\n", setting.Database.Type, version) return false } @@ -286,8 +286,8 @@ func wrappedMigrate(x *xorm.Engine) error { } func doMigrationTest(t *testing.T, version string) { - defer integrations.PrintCurrentTest(t)() - integrations.Printf("Performing migration test for %s version: %s\n", setting.Database.Type, version) + defer tests.PrintCurrentTest(t)() + tests.Printf("Performing migration test for %s version: %s\n", setting.Database.Type, version) if !restoreOldDB(t, version) { return } @@ -325,11 +325,11 @@ func TestMigrations(t *testing.T) { assert.NoError(t, err) if len(versions) == 0 { - integrations.Printf("No old database versions available to migration test for %s\n", dialect) + tests.Printf("No old database versions available to migration test for %s\n", dialect) return } - integrations.Printf("Preparing to test %d migrations for %s\n", len(versions), dialect) + tests.Printf("Preparing to test %d migrations for %s\n", len(versions), dialect) for _, version := range versions { t.Run(fmt.Sprintf("Migrate-%s-%s", dialect, version), func(t *testing.T) { doMigrationTest(t, version) diff --git a/integrations/mirror_pull_test.go b/tests/integration/mirror_pull_test.go similarity index 97% rename from integrations/mirror_pull_test.go rename to tests/integration/mirror_pull_test.go index dcba17be490a..707cf46fa0fa 100644 --- a/integrations/mirror_pull_test.go +++ b/tests/integration/mirror_pull_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -16,12 +16,13 @@ import ( "code.gitea.io/gitea/modules/repository" mirror_service "code.gitea.io/gitea/services/mirror" release_service "code.gitea.io/gitea/services/release" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestMirrorPull(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) diff --git a/integrations/mirror_push_test.go b/tests/integration/mirror_push_test.go similarity index 98% rename from integrations/mirror_push_test.go rename to tests/integration/mirror_push_test.go index 1af23d7837fa..f2adf5f5a330 100644 --- a/integrations/mirror_push_test.go +++ b/tests/integration/mirror_push_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "context" @@ -21,6 +21,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/services/migrations" mirror_service "code.gitea.io/gitea/services/mirror" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -30,7 +31,7 @@ func TestMirrorPush(t *testing.T) { } func testMirrorPush(t *testing.T, u *url.URL) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.Migrations.AllowLocalNetworks = true assert.NoError(t, migrations.Init()) diff --git a/integrations/nonascii_branches_test.go b/tests/integration/nonascii_branches_test.go similarity index 98% rename from integrations/nonascii_branches_test.go rename to tests/integration/nonascii_branches_test.go index 038ada8ca2de..ae69506f1b56 100644 --- a/integrations/nonascii_branches_test.go +++ b/tests/integration/nonascii_branches_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,6 +10,7 @@ import ( "path" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -197,7 +198,7 @@ func TestNonasciiBranches(t *testing.T) { }, } - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := "user2" repo := "utf8" diff --git a/integrations/oauth_test.go b/tests/integration/oauth_test.go similarity index 96% rename from integrations/oauth_test.go rename to tests/integration/oauth_test.go index c16bb4e24cda..7fa26c81474b 100644 --- a/integrations/oauth_test.go +++ b/tests/integration/oauth_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -19,20 +20,20 @@ import ( const defaultAuthorize = "/login/oauth/authorize?client_id=da7da3ba-9a13-4167-856f-3899de0b0138&redirect_uri=a&response_type=code&state=thestate" func TestNoClientID(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/login/oauth/authorize") ctx := loginUser(t, "user2") ctx.MakeRequest(t, req, http.StatusBadRequest) } func TestLoginRedirect(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/login/oauth/authorize") assert.Contains(t, MakeRequest(t, req, http.StatusSeeOther).Body.String(), "/user/login") } func TestShowAuthorize(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", defaultAuthorize) ctx := loginUser(t, "user4") resp := ctx.MakeRequest(t, req, http.StatusOK) @@ -43,7 +44,7 @@ func TestShowAuthorize(t *testing.T) { } func TestRedirectWithExistingGrant(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", defaultAuthorize) ctx := loginUser(t, "user1") resp := ctx.MakeRequest(t, req, http.StatusSeeOther) @@ -54,7 +55,7 @@ func TestRedirectWithExistingGrant(t *testing.T) { } func TestAccessTokenExchange(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithValues(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", "client_id": "da7da3ba-9a13-4167-856f-3899de0b0138", @@ -78,7 +79,7 @@ func TestAccessTokenExchange(t *testing.T) { } func TestAccessTokenExchangeWithoutPKCE(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithJSON(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", "client_id": "da7da3ba-9a13-4167-856f-3899de0b0138", @@ -102,7 +103,7 @@ func TestAccessTokenExchangeWithoutPKCE(t *testing.T) { } func TestAccessTokenExchangeJSON(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithJSON(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", "client_id": "da7da3ba-9a13-4167-856f-3899de0b0138", @@ -114,7 +115,7 @@ func TestAccessTokenExchangeJSON(t *testing.T) { } func TestAccessTokenExchangeWithInvalidCredentials(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // invalid client id req := NewRequestWithValues(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", @@ -168,7 +169,7 @@ func TestAccessTokenExchangeWithInvalidCredentials(t *testing.T) { } func TestAccessTokenExchangeWithBasicAuth(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithValues(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", "redirect_uri": "a", @@ -210,7 +211,7 @@ func TestAccessTokenExchangeWithBasicAuth(t *testing.T) { } func TestRefreshTokenInvalidation(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequestWithValues(t, "POST", "/login/oauth/access_token", map[string]string{ "grant_type": "authorization_code", "client_id": "da7da3ba-9a13-4167-856f-3899de0b0138", diff --git a/integrations/org_count_test.go b/tests/integration/org_count_test.go similarity index 99% rename from integrations/org_count_test.go rename to tests/integration/org_count_test.go index 2bffa90034a8..96f39924f133 100644 --- a/integrations/org_count_test.go +++ b/tests/integration/org_count_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/url" diff --git a/integrations/org_test.go b/tests/integration/org_test.go similarity index 96% rename from integrations/org_test.go rename to tests/integration/org_test.go index 9fb1175d7a61..d04fcf7f57aa 100644 --- a/integrations/org_test.go +++ b/tests/integration/org_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,12 +13,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestOrgRepos(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() var ( users = []string{"user1", "user2"} @@ -48,7 +49,7 @@ func TestOrgRepos(t *testing.T) { } func TestLimitedOrg(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // not logged in user req := NewRequest(t, "GET", "/limited_org") @@ -78,7 +79,7 @@ func TestLimitedOrg(t *testing.T) { } func TestPrivateOrg(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // not logged in user req := NewRequest(t, "GET", "/privated_org") @@ -117,7 +118,7 @@ func TestPrivateOrg(t *testing.T) { } func TestOrgMembers(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // not logged in user req := NewRequest(t, "GET", "/org/org25/members") @@ -135,7 +136,7 @@ func TestOrgMembers(t *testing.T) { } func TestOrgRestrictedUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // privated_org is a private org who has id 23 orgName := "privated_org" @@ -195,7 +196,7 @@ func TestOrgRestrictedUser(t *testing.T) { } func TestTeamSearch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 15}) org := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 17}) diff --git a/integrations/private-testing.key b/tests/integration/private-testing.key similarity index 100% rename from integrations/private-testing.key rename to tests/integration/private-testing.key diff --git a/integrations/privateactivity_test.go b/tests/integration/privateactivity_test.go similarity index 93% rename from integrations/privateactivity_test.go rename to tests/integration/privateactivity_test.go index d91a1ddc30d9..3f352e49c618 100644 --- a/integrations/privateactivity_test.go +++ b/tests/integration/privateactivity_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -138,7 +139,7 @@ func testPrivateActivityHelperHasHeatmapContentFromSession(t *testing.T, session // check activity visibility if the visibility is enabled func TestPrivateActivityNoVisibleForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) visible := testPrivateActivityHelperHasVisibleActivitiesFromPublic(t) @@ -147,7 +148,7 @@ func TestPrivateActivityNoVisibleForPublic(t *testing.T) { } func TestPrivateActivityNoVisibleForUserItself(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestUser) @@ -157,7 +158,7 @@ func TestPrivateActivityNoVisibleForUserItself(t *testing.T) { } func TestPrivateActivityNoVisibleForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestOtherUser) @@ -167,7 +168,7 @@ func TestPrivateActivityNoVisibleForOtherUser(t *testing.T) { } func TestPrivateActivityNoVisibleForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestAdmin) @@ -179,7 +180,7 @@ func TestPrivateActivityNoVisibleForAdmin(t *testing.T) { // check activity visibility if the visibility is disabled func TestPrivateActivityYesInvisibleForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -189,7 +190,7 @@ func TestPrivateActivityYesInvisibleForPublic(t *testing.T) { } func TestPrivateActivityYesVisibleForUserItself(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -200,7 +201,7 @@ func TestPrivateActivityYesVisibleForUserItself(t *testing.T) { } func TestPrivateActivityYesInvisibleForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -211,7 +212,7 @@ func TestPrivateActivityYesInvisibleForOtherUser(t *testing.T) { } func TestPrivateActivityYesVisibleForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -224,7 +225,7 @@ func TestPrivateActivityYesVisibleForAdmin(t *testing.T) { // check heatmap visibility if the visibility is enabled func TestPrivateActivityNoHeatmapVisibleForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) visible := testPrivateActivityHelperHasVisibleHeatmapFromPublic(t) @@ -233,7 +234,7 @@ func TestPrivateActivityNoHeatmapVisibleForPublic(t *testing.T) { } func TestPrivateActivityNoHeatmapVisibleForUserItselfAtProfile(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestUser) @@ -243,7 +244,7 @@ func TestPrivateActivityNoHeatmapVisibleForUserItselfAtProfile(t *testing.T) { } func TestPrivateActivityNoHeatmapVisibleForUserItselfAtDashboard(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestUser) @@ -253,7 +254,7 @@ func TestPrivateActivityNoHeatmapVisibleForUserItselfAtDashboard(t *testing.T) { } func TestPrivateActivityNoHeatmapVisibleForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestOtherUser) @@ -263,7 +264,7 @@ func TestPrivateActivityNoHeatmapVisibleForOtherUser(t *testing.T) { } func TestPrivateActivityNoHeatmapVisibleForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestAdmin) @@ -275,7 +276,7 @@ func TestPrivateActivityNoHeatmapVisibleForAdmin(t *testing.T) { // check heatmap visibility if the visibility is disabled func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -285,7 +286,7 @@ func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) { } func TestPrivateActivityYesHeatmapVisibleForUserItselfAtProfile(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -296,7 +297,7 @@ func TestPrivateActivityYesHeatmapVisibleForUserItselfAtProfile(t *testing.T) { } func TestPrivateActivityYesHeatmapVisibleForUserItselfAtDashboard(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -307,7 +308,7 @@ func TestPrivateActivityYesHeatmapVisibleForUserItselfAtDashboard(t *testing.T) } func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -318,7 +319,7 @@ func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) { } func TestPrivateActivityYesHeatmapVisibleForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -331,7 +332,7 @@ func TestPrivateActivityYesHeatmapVisibleForAdmin(t *testing.T) { // check heatmap api provides content if the visibility is enabled func TestPrivateActivityNoHeatmapHasContentForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) hasContent := testPrivateActivityHelperHasHeatmapContentFromPublic(t) @@ -340,7 +341,7 @@ func TestPrivateActivityNoHeatmapHasContentForPublic(t *testing.T) { } func TestPrivateActivityNoHeatmapHasContentForUserItself(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestUser) @@ -350,7 +351,7 @@ func TestPrivateActivityNoHeatmapHasContentForUserItself(t *testing.T) { } func TestPrivateActivityNoHeatmapHasContentForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestOtherUser) @@ -360,7 +361,7 @@ func TestPrivateActivityNoHeatmapHasContentForOtherUser(t *testing.T) { } func TestPrivateActivityNoHeatmapHasContentForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) session := loginUser(t, privateActivityTestAdmin) @@ -373,7 +374,7 @@ func TestPrivateActivityNoHeatmapHasContentForAdmin(t *testing.T) { // this should be equal to the hidden heatmap at the UI func TestPrivateActivityYesHeatmapHasNoContentForPublic(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -383,7 +384,7 @@ func TestPrivateActivityYesHeatmapHasNoContentForPublic(t *testing.T) { } func TestPrivateActivityYesHeatmapHasNoContentForUserItself(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -394,7 +395,7 @@ func TestPrivateActivityYesHeatmapHasNoContentForUserItself(t *testing.T) { } func TestPrivateActivityYesHeatmapHasNoContentForOtherUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -405,7 +406,7 @@ func TestPrivateActivityYesHeatmapHasNoContentForOtherUser(t *testing.T) { } func TestPrivateActivityYesHeatmapHasNoContentForAdmin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) diff --git a/integrations/pull_compare_test.go b/tests/integration/pull_compare_test.go similarity index 90% rename from integrations/pull_compare_test.go rename to tests/integration/pull_compare_test.go index 1dec39a28f59..7934b6e77c05 100644 --- a/integrations/pull_compare_test.go +++ b/tests/integration/pull_compare_test.go @@ -2,17 +2,18 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestPullCompare(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/pulls") diff --git a/integrations/pull_create_test.go b/tests/integration/pull_create_test.go similarity index 98% rename from integrations/pull_create_test.go rename to tests/integration/pull_create_test.go index 671b5e7551b5..24c73ab4e9c9 100644 --- a/integrations/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,6 +12,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -135,7 +136,7 @@ func testDeleteRepository(t *testing.T, session *TestSession, ownerName, repoNam func TestPullBranchDelete(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") diff --git a/integrations/pull_merge_test.go b/tests/integration/pull_merge_test.go similarity index 99% rename from integrations/pull_merge_test.go rename to tests/integration/pull_merge_test.go index 1ae1ec657671..335dae4b38ad 100644 --- a/integrations/pull_merge_test.go +++ b/tests/integration/pull_merge_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" diff --git a/integrations/pull_review_test.go b/tests/integration/pull_review_test.go similarity index 84% rename from integrations/pull_review_test.go rename to tests/integration/pull_review_test.go index d8f7b52d5499..d713c0f8589b 100644 --- a/integrations/pull_review_test.go +++ b/tests/integration/pull_review_test.go @@ -1,15 +1,17 @@ // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + + "code.gitea.io/gitea/tests" ) func TestPullView_ReviewerMissed(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/pulls") diff --git a/integrations/pull_status_test.go b/tests/integration/pull_status_test.go similarity index 99% rename from integrations/pull_status_test.go rename to tests/integration/pull_status_test.go index d38d90169bff..0f9cd41ec2ca 100644 --- a/integrations/pull_status_test.go +++ b/tests/integration/pull_status_test.go @@ -1,7 +1,7 @@ // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/pull_update_test.go b/tests/integration/pull_update_test.go similarity index 99% rename from integrations/pull_update_test.go rename to tests/integration/pull_update_test.go index 475382c04331..c08faaaeb6f4 100644 --- a/integrations/pull_update_test.go +++ b/tests/integration/pull_update_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/release_test.go b/tests/integration/release_test.go similarity index 94% rename from integrations/release_test.go rename to tests/integration/release_test.go index 5c6290422d40..2a52a5cde21c 100644 --- a/integrations/release_test.go +++ b/tests/integration/release_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" @@ -63,7 +64,7 @@ func checkLatestReleaseAndCount(t *testing.T, session *TestSession, repoURL, ver } func TestViewReleases(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/releases") @@ -74,14 +75,14 @@ func TestViewReleases(t *testing.T) { } func TestViewReleasesNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1/releases") MakeRequest(t, req, http.StatusOK) } func TestCreateRelease(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", false, false) @@ -90,7 +91,7 @@ func TestCreateRelease(t *testing.T) { } func TestCreateReleasePreRelease(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", true, false) @@ -99,7 +100,7 @@ func TestCreateReleasePreRelease(t *testing.T) { } func TestCreateReleaseDraft(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", false, true) @@ -108,7 +109,7 @@ func TestCreateReleaseDraft(t *testing.T) { } func TestCreateReleasePaging(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() oldAPIDefaultNum := setting.API.DefaultPagingNum defer func() { @@ -132,7 +133,7 @@ func TestCreateReleasePaging(t *testing.T) { } func TestViewReleaseListNoLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -158,7 +159,7 @@ func TestViewReleaseListNoLogin(t *testing.T) { } func TestViewReleaseListLogin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) @@ -189,7 +190,7 @@ func TestViewReleaseListLogin(t *testing.T) { } func TestViewTagsList(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) diff --git a/integrations/rename_branch_test.go b/tests/integration/rename_branch_test.go similarity index 98% rename from integrations/rename_branch_test.go rename to tests/integration/rename_branch_test.go index ad27869cde04..9ea69702afab 100644 --- a/integrations/rename_branch_test.go +++ b/tests/integration/rename_branch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/repo_activity_test.go b/tests/integration/repo_activity_test.go similarity index 99% rename from integrations/repo_activity_test.go rename to tests/integration/repo_activity_test.go index a10ec7f2d3d8..ea8845ac3941 100644 --- a/integrations/repo_activity_test.go +++ b/tests/integration/repo_activity_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" diff --git a/integrations/repo_branch_test.go b/tests/integration/repo_branch_test.go similarity index 98% rename from integrations/repo_branch_test.go rename to tests/integration/repo_branch_test.go index 74d85c5b1f1b..96ffa5a46e6c 100644 --- a/integrations/repo_branch_test.go +++ b/tests/integration/repo_branch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -129,7 +130,7 @@ func testCreateBranches(t *testing.T, giteaURL *url.URL) { } func TestCreateBranchInvalidCSRF(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequestWithValues(t, "POST", "user2/repo1/branches/_new/branch/master", map[string]string{ "_csrf": "fake_csrf", diff --git a/integrations/repo_commits_search_test.go b/tests/integration/repo_commits_search_test.go similarity index 94% rename from integrations/repo_commits_search_test.go rename to tests/integration/repo_commits_search_test.go index 0dc0588297f1..75e692f0abdc 100644 --- a/integrations/repo_commits_search_test.go +++ b/tests/integration/repo_commits_search_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,6 +10,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -26,7 +27,7 @@ func testRepoCommitsSearch(t *testing.T, query, commit string) { } func TestRepoCommitsSearch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() testRepoCommitsSearch(t, "e8eabd", "") testRepoCommitsSearch(t, "38a9cb", "") testRepoCommitsSearch(t, "6e8e", "6e8eabd9a7") diff --git a/integrations/repo_commits_test.go b/tests/integration/repo_commits_test.go similarity index 97% rename from integrations/repo_commits_test.go rename to tests/integration/repo_commits_test.go index b18b35da1e65..c9e77535962b 100644 --- a/integrations/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -13,12 +13,13 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestRepoCommits(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -33,7 +34,7 @@ func TestRepoCommits(t *testing.T) { } func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") diff --git a/integrations/repo_fork_test.go b/tests/integration/repo_fork_test.go similarity index 96% rename from integrations/repo_fork_test.go rename to tests/integration/repo_fork_test.go index 17133621d650..4ab3577b5493 100644 --- a/integrations/repo_fork_test.go +++ b/tests/integration/repo_fork_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -55,13 +56,13 @@ func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkO } func TestRepoFork(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") testRepoFork(t, session, "user2", "repo1", "user1", "repo1") } func TestRepoForkToOrg(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testRepoFork(t, session, "user2", "repo1", "user3", "repo1") diff --git a/integrations/repo_generate_test.go b/tests/integration/repo_generate_test.go similarity index 95% rename from integrations/repo_generate_test.go rename to tests/integration/repo_generate_test.go index d34983f528df..61a632721e8e 100644 --- a/integrations/repo_generate_test.go +++ b/tests/integration/repo_generate_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -56,13 +57,13 @@ func testRepoGenerate(t *testing.T, session *TestSession, templateOwnerName, tem } func TestRepoGenerate(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user1") testRepoGenerate(t, session, "user27", "template1", "user1", "generated1") } func TestRepoGenerateToOrg(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testRepoGenerate(t, session, "user27", "template1", "user2", "generated2") } diff --git a/integrations/repo_migrate_test.go b/tests/integration/repo_migrate_test.go similarity index 94% rename from integrations/repo_migrate_test.go rename to tests/integration/repo_migrate_test.go index 4e6923dd6f57..c69a2642cbe3 100644 --- a/integrations/repo_migrate_test.go +++ b/tests/integration/repo_migrate_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -11,6 +11,7 @@ import ( "testing" "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -39,7 +40,7 @@ func testRepoMigrate(t testing.TB, session *TestSession, cloneAddr, repoName str } func TestRepoMigrate(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testRepoMigrate(t, session, "https://github.com/go-gitea/test_repo.git", "git") } diff --git a/integrations/repo_search_test.go b/tests/integration/repo_search_test.go similarity index 96% rename from integrations/repo_search_test.go rename to tests/integration/repo_search_test.go index a1cc5811b9f4..b20943c22ac6 100644 --- a/integrations/repo_search_test.go +++ b/tests/integration/repo_search_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,6 +11,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" code_indexer "code.gitea.io/gitea/modules/indexer/code" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" @@ -26,7 +27,7 @@ func resultFilenames(t testing.TB, doc *HTMLDoc) []string { } func TestSearchRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo, err := repo_model.GetRepositoryByOwnerAndName("user2", "repo1") assert.NoError(t, err) diff --git a/integrations/repo_tag_test.go b/tests/integration/repo_tag_test.go similarity index 95% rename from integrations/repo_tag_test.go rename to tests/integration/repo_tag_test.go index 8bb7c9f32af0..a91f1fb2094e 100644 --- a/integrations/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/url" @@ -17,18 +17,19 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/release" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestCreateNewTagProtected(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) t.Run("API", func(t *testing.T) { - defer PrintCurrentTest(t)() + defer tests.PrintCurrentTest(t)() err := release.CreateNewTag(git.DefaultContext, owner, repo, "master", "v-1", "first tag") assert.NoError(t, err) diff --git a/integrations/repo_test.go b/tests/integration/repo_test.go similarity index 94% rename from integrations/repo_test.go rename to tests/integration/repo_test.go index c2ac6183f045..8dfa9d08f145 100644 --- a/integrations/repo_test.go +++ b/tests/integration/repo_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,13 +13,14 @@ import ( "time" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" ) func TestViewRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1") MakeRequest(t, req, http.StatusOK) @@ -32,7 +33,7 @@ func TestViewRepo(t *testing.T) { } func testViewRepo(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user3/repo3") session := loginUser(t, "user2") @@ -100,7 +101,7 @@ func TestViewRepo2(t *testing.T) { } func TestViewRepo3(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user3/repo3") session := loginUser(t, "user4") @@ -108,7 +109,7 @@ func TestViewRepo3(t *testing.T) { } func TestViewRepo1CloneLinkAnonymous(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2/repo1") resp := MakeRequest(t, req, http.StatusOK) @@ -122,7 +123,7 @@ func TestViewRepo1CloneLinkAnonymous(t *testing.T) { } func TestViewRepo1CloneLinkAuthorized(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -140,7 +141,7 @@ func TestViewRepo1CloneLinkAuthorized(t *testing.T) { } func TestViewRepoWithSymlinks(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") @@ -168,7 +169,7 @@ func TestViewAsRepoAdmin(t *testing.T) { "user2": true, "user4": false, } { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, user) diff --git a/integrations/repo_topic_test.go b/tests/integration/repo_topic_test.go similarity index 94% rename from integrations/repo_topic_test.go rename to tests/integration/repo_topic_test.go index e049afdd7c19..5ff0c8273a4c 100644 --- a/integrations/repo_topic_test.go +++ b/tests/integration/repo_topic_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "testing" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestTopicSearch(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() searchURL, _ := url.Parse("/explore/topics/search") var topics struct { TopicNames []*api.TopicResponse `json:"topics"` diff --git a/integrations/repo_watch_test.go b/tests/integration/repo_watch_test.go similarity index 97% rename from integrations/repo_watch_test.go rename to tests/integration/repo_watch_test.go index 2ff3b26361bc..152600bf2995 100644 --- a/integrations/repo_watch_test.go +++ b/tests/integration/repo_watch_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/url" diff --git a/integrations/repofiles_delete_test.go b/tests/integration/repofiles_delete_test.go similarity index 99% rename from integrations/repofiles_delete_test.go rename to tests/integration/repofiles_delete_test.go index a6c2484a5691..f594efdeeb58 100644 --- a/integrations/repofiles_delete_test.go +++ b/tests/integration/repofiles_delete_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/url" diff --git a/integrations/repofiles_update_test.go b/tests/integration/repofiles_update_test.go similarity index 99% rename from integrations/repofiles_update_test.go rename to tests/integration/repofiles_update_test.go index ac9b0509eae4..c62c49eeebb3 100644 --- a/integrations/repofiles_update_test.go +++ b/tests/integration/repofiles_update_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/url" diff --git a/integrations/setting_test.go b/tests/integration/setting_test.go similarity index 95% rename from integrations/setting_test.go rename to tests/integration/setting_test.go index 3852eb4955aa..6273545c2362 100644 --- a/integrations/setting_test.go +++ b/tests/integration/setting_test.go @@ -2,19 +2,20 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestSettingShowUserEmailExplore(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() showUserEmail := setting.UI.ShowUserEmail setting.UI.ShowUserEmail = true @@ -42,7 +43,7 @@ func TestSettingShowUserEmailExplore(t *testing.T) { } func TestSettingShowUserEmailProfile(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() showUserEmail := setting.UI.ShowUserEmail setting.UI.ShowUserEmail = true @@ -80,7 +81,7 @@ func TestSettingShowUserEmailProfile(t *testing.T) { } func TestSettingLandingPage(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() landingPage := setting.LandingPageURL diff --git a/integrations/signin_test.go b/tests/integration/signin_test.go similarity index 95% rename from integrations/signin_test.go rename to tests/integration/signin_test.go index 568ceb40ca5d..7dc078e27441 100644 --- a/integrations/signin_test.go +++ b/tests/integration/signin_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) @@ -32,7 +33,7 @@ func testLoginFailed(t *testing.T, username, password, message string) { } func TestSignin(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) diff --git a/integrations/signout_test.go b/tests/integration/signout_test.go similarity index 87% rename from integrations/signout_test.go rename to tests/integration/signout_test.go index 8ef97e89c528..1f1346a5c3c2 100644 --- a/integrations/signout_test.go +++ b/tests/integration/signout_test.go @@ -2,15 +2,17 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + + "code.gitea.io/gitea/tests" ) func TestSignOut(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") diff --git a/integrations/signup_test.go b/tests/integration/signup_test.go similarity index 94% rename from integrations/signup_test.go rename to tests/integration/signup_test.go index 071ece9fa16c..1c598fd0d125 100644 --- a/integrations/signup_test.go +++ b/tests/integration/signup_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -14,12 +14,13 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestSignup(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.Service.EnableCaptcha = false @@ -37,7 +38,7 @@ func TestSignup(t *testing.T) { } func TestSignupAsRestricted(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.Service.EnableCaptcha = false setting.Service.DefaultUserIsRestricted = true @@ -59,7 +60,7 @@ func TestSignupAsRestricted(t *testing.T) { } func TestSignupEmail(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.Service.EnableCaptcha = false diff --git a/integrations/ssh_key_test.go b/tests/integration/ssh_key_test.go similarity index 99% rename from integrations/ssh_key_test.go rename to tests/integration/ssh_key_test.go index e0ff13543e53..65d9b84404be 100644 --- a/integrations/ssh_key_test.go +++ b/tests/integration/ssh_key_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" diff --git a/integrations/timetracking_test.go b/tests/integration/timetracking_test.go similarity index 94% rename from integrations/timetracking_test.go rename to tests/integration/timetracking_test.go index 17e9174e5d91..54b81ff3bc0c 100644 --- a/integrations/timetracking_test.go +++ b/tests/integration/timetracking_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -11,26 +11,27 @@ import ( "time" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestViewTimetrackingControls(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testViewTimetrackingControls(t, session, "user2", "repo1", "1", true) // user2/repo1 } func TestNotViewTimetrackingControls(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user5") testViewTimetrackingControls(t, session, "user2", "repo1", "1", false) // user2/repo1 } func TestViewTimetrackingControlsDisabled(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") testViewTimetrackingControls(t, session, "user3", "repo3", "1", false) } diff --git a/integrations/user_avatar_test.go b/tests/integration/user_avatar_test.go similarity index 98% rename from integrations/user_avatar_test.go rename to tests/integration/user_avatar_test.go index ee532bb64a27..35be840c29c8 100644 --- a/integrations/user_avatar_test.go +++ b/tests/integration/user_avatar_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "bytes" diff --git a/integrations/user_test.go b/tests/integration/user_test.go similarity index 97% rename from integrations/user_test.go rename to tests/integration/user_test.go index b0c1cd42ebe3..110f5c89bfbd 100644 --- a/integrations/user_test.go +++ b/tests/integration/user_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -15,19 +15,20 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestViewUser(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() req := NewRequest(t, "GET", "/user2") MakeRequest(t, req, http.StatusOK) } func TestRenameUsername(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ @@ -43,7 +44,7 @@ func TestRenameUsername(t *testing.T) { } func TestRenameInvalidUsername(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() invalidUsernames := []string{ "%2f*", @@ -75,7 +76,7 @@ func TestRenameInvalidUsername(t *testing.T) { } func TestRenameReservedUsername(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() reservedUsernames := []string{ ".", @@ -139,7 +140,7 @@ func TestRenameReservedUsername(t *testing.T) { } func TestExportUserGPGKeys(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() // Export empty key list testExportUserGPGKeys(t, "user1", `-----BEGIN PGP PUBLIC KEY BLOCK----- Note: This user hasn't uploaded any GPG keys. @@ -227,7 +228,7 @@ func testExportUserGPGKeys(t *testing.T, user, expected string) { } func TestListStopWatches(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1}) owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID}) diff --git a/integrations/version_test.go b/tests/integration/version_test.go similarity index 87% rename from integrations/version_test.go rename to tests/integration/version_test.go index a1d2f6c882c3..83be62d3f468 100644 --- a/integrations/version_test.go +++ b/tests/integration/version_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestVersion(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.AppVer = "test-version-1" req := NewRequest(t, "GET", "/api/v1/version") diff --git a/integrations/view_test.go b/tests/integration/view_test.go similarity index 89% rename from integrations/view_test.go rename to tests/integration/view_test.go index 180cf2e50a46..63544dbe3519 100644 --- a/integrations/view_test.go +++ b/tests/integration/view_test.go @@ -2,17 +2,18 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" "testing" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestRenderFileSVGIsInImgTag(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() session := loginUser(t, "user2") diff --git a/integrations/webfinger_test.go b/tests/integration/webfinger_test.go similarity index 96% rename from integrations/webfinger_test.go rename to tests/integration/webfinger_test.go index 3574941e4216..bb3447c809af 100644 --- a/integrations/webfinger_test.go +++ b/tests/integration/webfinger_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "fmt" @@ -13,12 +13,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestWebfinger(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() setting.Federation.Enabled = true defer func() { diff --git a/integrations/xss_test.go b/tests/integration/xss_test.go similarity index 93% rename from integrations/xss_test.go rename to tests/integration/xss_test.go index d5ce94b0c6cc..53b23072ad64 100644 --- a/integrations/xss_test.go +++ b/tests/integration/xss_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package integration import ( "net/http" @@ -10,12 +10,13 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" ) func TestXSSUserFullName(t *testing.T) { - defer prepareTestEnv(t)() + defer tests.PrepareTestEnv(t)() user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) const fullName = `name & ` diff --git a/integrations/mssql.ini.tmpl b/tests/mssql.ini.tmpl similarity index 71% rename from integrations/mssql.ini.tmpl rename to tests/mssql.ini.tmpl index d4d1517011e2..9cec6169f979 100644 --- a/integrations/mssql.ini.tmpl +++ b/tests/mssql.ini.tmpl @@ -11,11 +11,11 @@ SSL_MODE = disable [indexer] REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/repos.bleve +REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/indexers/repos.bleve [queue.issue_indexer] -PATH = integrations/gitea-integration-mssql/indexers/issues.bleve -DATADIR = integrations/gitea-integration-mssql/indexers/issues.queue +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/indexers/issues.bleve +DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/indexers/issues.queue [queue] TYPE = immediate @@ -27,13 +27,13 @@ TYPE = immediate TYPE = immediate [repository] -ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mssql/gitea-repositories +ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = integrations/gitea-integration-mssql/tmp/local-repo +LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/tmp/local-repo [repository.upload] -TEMP_PATH = integrations/gitea-integration-mssql/tmp/uploads +TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -49,17 +49,17 @@ START_SSH_SERVER = true LFS_START_SERVER = true OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w -APP_DATA_PATH = integrations/gitea-integration-mssql/data +APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data BUILTIN_SSH_SERVER_USER = git SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXWo7GMxTchtzmJHYzfN6sZ9FAPFR4ijMLfGki+olvOMO5Fql1/yGnGfbELQa1S6y4shSvj/5K+zUFScmEXYf3Gcr87RqilLkyk16RS+cHNB1u87xTHbETaa3nyCJeGQRpd4IQ4NKob745mwDZ7jQBH8AZEng50Oh8y8fi8skBBBzaYp1ilgvzG740L7uex6fHV62myq0SXeCa+oJUjq326FU8y+Vsa32H8A3e7tOgXZPdt2TVNltx2S9H2WO8RMi7LfaSwARNfy1zu+bfR50r6ef8Yx5YKCMz4wWb1SHU1GS800mjOjlInLQORYRNMlSwR1+vLlVDciOqFapDSbj+YOVOawR0R1aqlSKpZkt33DuOBPx9qe6CVnIi7Z+Px/KqM+OLCzlLY/RS+LbxQpDWcfTVRiP+S5qRTcE3M3UioN/e0BE/1+MpX90IGpvVkA63ILYbKEa4bM3ASL7ChTCr6xN5XT+GpVJveFKK1cfNx9ExHI4rzYE= [attachment] -PATH = integrations/gitea-integration-mssql/data/attachments +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/attachments [mailer] ENABLED = true MAILER_TYPE = dummy -FROM = mssql-integration-test@gitea.io +FROM = mssql-{{TEST_TYPE}}-test@gitea.io [service] REGISTER_EMAIL_CONFIRM = false @@ -76,15 +76,15 @@ ENABLE_NOTIFY_MAIL = true [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false -AVATAR_UPLOAD_PATH = integrations/gitea-integration-mssql/data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-mssql/data/repo-avatars +AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/repo-avatars [session] PROVIDER = file -PROVIDER_CONFIG = integrations/gitea-integration-mssql/data/sessions +PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/sessions [log] -MODE = test,file +MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mssql-log ROUTER = , XORM = file @@ -104,7 +104,7 @@ SECRET_KEY = 9pCviYTWSb INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ [lfs] -PATH = integrations/gitea-integration-mssql/data/lfs +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/lfs [packages] ENABLED = true diff --git a/integrations/mysql.ini.tmpl b/tests/mysql.ini.tmpl similarity index 82% rename from integrations/mysql.ini.tmpl rename to tests/mysql.ini.tmpl index 8f610326e245..24a9a02dc46c 100644 --- a/integrations/mysql.ini.tmpl +++ b/tests/mysql.ini.tmpl @@ -11,12 +11,12 @@ SSL_MODE = disable [indexer] REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/gitea-integration-mysql/indexers/repos.bleve +REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/indexers/repos.bleve [queue.issue_indexer] TYPE = elasticsearch CONN_STR = http://elastic:changeme@elasticsearch:9200 -DATADIR = integrations/gitea-integration-mysql/indexers/issues.queue +DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/indexers/issues.queue [queue] TYPE = immediate @@ -28,13 +28,13 @@ TYPE = immediate TYPE = immediate [repository] -ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql/gitea-repositories +ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = integrations/gitea-integration-mysql/tmp/local-repo +LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/tmp/local-repo [repository.upload] -TEMP_PATH = integrations/gitea-integration-mysql/tmp/uploads +TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -46,7 +46,7 @@ ROOT_URL = http://localhost:3001/ DISABLE_SSH = false SSH_LISTEN_HOST = localhost SSH_PORT = 2201 -APP_DATA_PATH = integrations/gitea-integration-mysql/data +APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/data BUILTIN_SSH_SERVER_USER = git START_SSH_SERVER = true OFFLINE_MODE = false @@ -80,7 +80,7 @@ MINIO_USE_SSL = false [mailer] ENABLED = true MAILER_TYPE = dummy -FROM = mysql-integration-test@gitea.io +FROM = mysql-{{TEST_TYPE}}-test@gitea.io [service] REGISTER_EMAIL_CONFIRM = false @@ -100,10 +100,10 @@ ENABLE_FEDERATED_AVATAR = false [session] PROVIDER = file -PROVIDER_CONFIG = integrations/gitea-integration-mysql/data/sessions +PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/data/sessions [log] -MODE = test,file +MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mysql-log ROUTER = , XORM = file diff --git a/integrations/mysql8.ini.tmpl b/tests/mysql8.ini.tmpl similarity index 71% rename from integrations/mysql8.ini.tmpl rename to tests/mysql8.ini.tmpl index 5133058237c2..f290efe1dcb1 100644 --- a/integrations/mysql8.ini.tmpl +++ b/tests/mysql8.ini.tmpl @@ -11,11 +11,11 @@ SSL_MODE = disable [indexer] REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/repos.bleve +REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/indexers/repos.bleve [queue.issue_indexer] -PATH = integrations/gitea-integration-mysql8/indexers/issues.bleve -DATADIR = integrations/gitea-integration-mysql8/indexers/issues.queue +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/indexers/issues.bleve +DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/indexers/issues.queue [queue] TYPE = immediate @@ -27,13 +27,13 @@ TYPE = immediate TYPE = immediate [repository] -ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql8/gitea-repositories +ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/gitea-repositories [repository.local] -LOCAL_COPY_PATH = integrations/gitea-integration-mysql8/tmp/local-repo +LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/tmp/local-repo [repository.upload] -TEMP_PATH = integrations/gitea-integration-mysql8/tmp/uploads +TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -49,12 +49,12 @@ START_SSH_SERVER = true LFS_START_SERVER = true OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w -APP_DATA_PATH = integrations/gitea-integration-mysql8/data +APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data BUILTIN_SSH_SERVER_USER = git SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXWo7GMxTchtzmJHYzfN6sZ9FAPFR4ijMLfGki+olvOMO5Fql1/yGnGfbELQa1S6y4shSvj/5K+zUFScmEXYf3Gcr87RqilLkyk16RS+cHNB1u87xTHbETaa3nyCJeGQRpd4IQ4NKob745mwDZ7jQBH8AZEng50Oh8y8fi8skBBBzaYp1ilgvzG740L7uex6fHV62myq0SXeCa+oJUjq326FU8y+Vsa32H8A3e7tOgXZPdt2TVNltx2S9H2WO8RMi7LfaSwARNfy1zu+bfR50r6ef8Yx5YKCMz4wWb1SHU1GS800mjOjlInLQORYRNMlSwR1+vLlVDciOqFapDSbj+YOVOawR0R1aqlSKpZkt33DuOBPx9qe6CVnIi7Z+Px/KqM+OLCzlLY/RS+LbxQpDWcfTVRiP+S5qRTcE3M3UioN/e0BE/1+MpX90IGpvVkA63ILYbKEa4bM3ASL7ChTCr6xN5XT+GpVJveFKK1cfNx9ExHI4rzYE= [attachment] -PATH = integrations/gitea-integration-mysql8/data/attachments +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/attachments [mailer] ENABLED = false @@ -73,15 +73,15 @@ NO_REPLY_ADDRESS = noreply.example.org [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false -AVATAR_UPLOAD_PATH = integrations/gitea-integration-mysql8/data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-mysql8/data/repo-avatars +AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/repo-avatars [session] PROVIDER = file -PROVIDER_CONFIG = integrations/gitea-integration-mysql8/data/sessions +PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/sessions [log] -MODE = test,file +MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mysql8-log ROUTER = , XORM = file @@ -101,7 +101,7 @@ SECRET_KEY = 9pCviYTWSb INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ [lfs] -PATH = integrations/gitea-integration-mysql8/data/lfs +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/lfs [packages] ENABLED = true diff --git a/integrations/pgsql.ini.tmpl b/tests/pgsql.ini.tmpl similarity index 71% rename from integrations/pgsql.ini.tmpl rename to tests/pgsql.ini.tmpl index 15cd6a057b2c..c39b6a79c3a8 100644 --- a/integrations/pgsql.ini.tmpl +++ b/tests/pgsql.ini.tmpl @@ -12,11 +12,11 @@ SSL_MODE = disable [indexer] REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/repos.bleve +REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/indexers/repos.bleve [queue.issue_indexer] -PATH = integrations/gitea-integration-pgsql/indexers/issues.bleve -DATADIR = integrations/gitea-integration-pgsql/indexers/issues.queue +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/indexers/issues.bleve +DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/indexers/issues.queue [queue] TYPE = immediate @@ -28,13 +28,13 @@ TYPE = immediate TYPE = immediate [repository] -ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-pgsql/gitea-repositories +ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = integrations/gitea-integration-pgsql/tmp/local-repo +LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/tmp/local-repo [repository.upload] -TEMP_PATH = integrations/gitea-integration-pgsql/tmp/uploads +TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -50,17 +50,17 @@ START_SSH_SERVER = true LFS_START_SERVER = true OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w -APP_DATA_PATH = integrations/gitea-integration-pgsql/data +APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data BUILTIN_SSH_SERVER_USER = git SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXWo7GMxTchtzmJHYzfN6sZ9FAPFR4ijMLfGki+olvOMO5Fql1/yGnGfbELQa1S6y4shSvj/5K+zUFScmEXYf3Gcr87RqilLkyk16RS+cHNB1u87xTHbETaa3nyCJeGQRpd4IQ4NKob745mwDZ7jQBH8AZEng50Oh8y8fi8skBBBzaYp1ilgvzG740L7uex6fHV62myq0SXeCa+oJUjq326FU8y+Vsa32H8A3e7tOgXZPdt2TVNltx2S9H2WO8RMi7LfaSwARNfy1zu+bfR50r6ef8Yx5YKCMz4wWb1SHU1GS800mjOjlInLQORYRNMlSwR1+vLlVDciOqFapDSbj+YOVOawR0R1aqlSKpZkt33DuOBPx9qe6CVnIi7Z+Px/KqM+OLCzlLY/RS+LbxQpDWcfTVRiP+S5qRTcE3M3UioN/e0BE/1+MpX90IGpvVkA63ILYbKEa4bM3ASL7ChTCr6xN5XT+GpVJveFKK1cfNx9ExHI4rzYE= [attachment] -PATH = integrations/gitea-integration-pgsql/data/attachments +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/attachments [mailer] ENABLED = true MAILER_TYPE = dummy -FROM = pgsql-integration-test@gitea.io +FROM = pgsql-{{TEST_TYPE}}-test@gitea.io [service] REGISTER_EMAIL_CONFIRM = false @@ -77,15 +77,15 @@ ENABLE_NOTIFY_MAIL = true [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false -AVATAR_UPLOAD_PATH = integrations/gitea-integration-pgsql/data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-pgsql/data/repo-avatars +AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/repo-avatars [session] PROVIDER = file -PROVIDER_CONFIG = integrations/gitea-integration-pgsql/data/sessions +PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/sessions [log] -MODE = test,file +MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}pgsql-log ROUTER = , XORM = file @@ -105,7 +105,7 @@ SECRET_KEY = 9pCviYTWSb INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ [lfs] -PATH = integrations/gitea-integration-pgsql/data/lfs +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/lfs [packages] ENABLED = true diff --git a/integrations/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl similarity index 68% rename from integrations/sqlite.ini.tmpl rename to tests/sqlite.ini.tmpl index fa57e1aa96b8..f5e8895e063a 100644 --- a/integrations/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -3,15 +3,15 @@ RUN_MODE = prod [database] DB_TYPE = sqlite3 -PATH = integrations/gitea-integration-sqlite/gitea.db +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea.db [indexer] REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/gitea-integration-sqlite/indexers/repos.bleve +REPO_INDEXER_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/indexers/repos.bleve [queue.issue_indexer] -PATH = integrations/gitea-integration-sqlite/indexers/issues.bleve -DATADIR = integrations/gitea-integration-sqlite/indexers/issues.queue +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/indexers/issues.bleve +DATADIR = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/indexers/issues.queue [queue] TYPE = immediate @@ -23,13 +23,13 @@ TYPE = immediate TYPE = immediate [repository] -ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-sqlite/gitea-repositories +ROOT = {{REPO_TEST_DIR}}tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea-repositories [repository.local] -LOCAL_COPY_PATH = integrations/gitea-integration-sqlite/tmp/local-repo +LOCAL_COPY_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/tmp/local-repo [repository.upload] -TEMP_PATH = integrations/gitea-integration-sqlite/tmp/uploads +TEMP_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -45,18 +45,18 @@ START_SSH_SERVER = true LFS_START_SERVER = true OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w -APP_DATA_PATH = integrations/gitea-integration-sqlite/data +APP_DATA_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data ENABLE_GZIP = true BUILTIN_SSH_SERVER_USER = git SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXWo7GMxTchtzmJHYzfN6sZ9FAPFR4ijMLfGki+olvOMO5Fql1/yGnGfbELQa1S6y4shSvj/5K+zUFScmEXYf3Gcr87RqilLkyk16RS+cHNB1u87xTHbETaa3nyCJeGQRpd4IQ4NKob745mwDZ7jQBH8AZEng50Oh8y8fi8skBBBzaYp1ilgvzG740L7uex6fHV62myq0SXeCa+oJUjq326FU8y+Vsa32H8A3e7tOgXZPdt2TVNltx2S9H2WO8RMi7LfaSwARNfy1zu+bfR50r6ef8Yx5YKCMz4wWb1SHU1GS800mjOjlInLQORYRNMlSwR1+vLlVDciOqFapDSbj+YOVOawR0R1aqlSKpZkt33DuOBPx9qe6CVnIi7Z+Px/KqM+OLCzlLY/RS+LbxQpDWcfTVRiP+S5qRTcE3M3UioN/e0BE/1+MpX90IGpvVkA63ILYbKEa4bM3ASL7ChTCr6xN5XT+GpVJveFKK1cfNx9ExHI4rzYE= [attachment] -PATH = integrations/gitea-integration-sqlite/data/attachments +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/attachments [mailer] ENABLED = true MAILER_TYPE = dummy -FROM = sqlite-integration-test@gitea.io +FROM = sqlite-{{TEST_TYPE}}-test@gitea.io [service] REGISTER_EMAIL_CONFIRM = false @@ -72,15 +72,15 @@ NO_REPLY_ADDRESS = noreply.example.org [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false -AVATAR_UPLOAD_PATH = integrations/gitea-integration-sqlite/data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-sqlite/data/repo-avatars +AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/repo-avatars [session] PROVIDER = file -PROVIDER_CONFIG = integrations/gitea-integration-sqlite/data/sessions +PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/sessions [log] -MODE = test,file +MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}sqlite-log ROUTER = , XORM = file @@ -103,7 +103,7 @@ INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTI3OTU5ODN9.O JWT_SECRET = KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko [lfs] -PATH = integrations/gitea-integration-sqlite/data/lfs +PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/lfs [packages] ENABLED = true diff --git a/tests/test_utils.go b/tests/test_utils.go new file mode 100644 index 000000000000..06625300025c --- /dev/null +++ b/tests/test_utils.go @@ -0,0 +1,224 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package tests + +import ( + "context" + "database/sql" + "fmt" + "os" + "path" + "path/filepath" + "runtime" + "testing" + + "code.gitea.io/gitea/models/unittest" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/queue" + repo_module "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/routers" + + "github.com/stretchr/testify/assert" +) + +func InitTest(requireGitea bool) { + giteaRoot := base.SetupGiteaRoot() + if giteaRoot == "" { + fmt.Println("Environment variable $GITEA_ROOT not set") + os.Exit(1) + } + if requireGitea { + giteaBinary := "gitea" + if runtime.GOOS == "windows" { + giteaBinary += ".exe" + } + setting.AppPath = path.Join(giteaRoot, giteaBinary) + if _, err := os.Stat(setting.AppPath); err != nil { + fmt.Printf("Could not find gitea binary at %s\n", setting.AppPath) + os.Exit(1) + } + } + + giteaConf := os.Getenv("GITEA_CONF") + if giteaConf == "" { + fmt.Println("Environment variable $GITEA_CONF not set") + os.Exit(1) + } else if !path.IsAbs(giteaConf) { + setting.CustomConf = path.Join(giteaRoot, giteaConf) + } else { + setting.CustomConf = giteaConf + } + + setting.SetCustomPathAndConf("", "", "") + setting.LoadForTest() + setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master" + _ = util.RemoveAll(repo_module.LocalCopyPath()) + + if err := git.InitFull(context.Background()); err != nil { + log.Fatal("git.InitOnceWithSync: %v", err) + } + + setting.InitDBConfig() + if err := storage.Init(); err != nil { + fmt.Printf("Init storage failed: %v", err) + os.Exit(1) + } + + switch { + case setting.Database.UseMySQL: + connType := "tcp" + if len(setting.Database.Host) > 0 && setting.Database.Host[0] == '/' { // looks like a unix socket + connType = "unix" + } + + db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@%s(%s)/", + setting.Database.User, setting.Database.Passwd, connType, setting.Database.Host)) + defer db.Close() + if err != nil { + log.Fatal("sql.Open: %v", err) + } + if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s", setting.Database.Name)); err != nil { + log.Fatal("db.Exec: %v", err) + } + case setting.Database.UsePostgreSQL: + var db *sql.DB + var err error + if setting.Database.Host[0] == '/' { + db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) + } else { + db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) + } + + defer db.Close() + if err != nil { + log.Fatal("sql.Open: %v", err) + } + dbrows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'", setting.Database.Name)) + if err != nil { + log.Fatal("db.Query: %v", err) + } + defer dbrows.Close() + + if !dbrows.Next() { + if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE %s", setting.Database.Name)); err != nil { + log.Fatal("db.Exec: CREATE DATABASE: %v", err) + } + } + // Check if we need to setup a specific schema + if len(setting.Database.Schema) == 0 { + break + } + db.Close() + + if setting.Database.Host[0] == '/' { + db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) + } else { + db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) + } + // This is a different db object; requires a different Close() + defer db.Close() + if err != nil { + log.Fatal("sql.Open: %v", err) + } + schrows, err := db.Query(fmt.Sprintf("SELECT 1 FROM information_schema.schemata WHERE schema_name = '%s'", setting.Database.Schema)) + if err != nil { + log.Fatal("db.Query: %v", err) + } + defer schrows.Close() + + if !schrows.Next() { + // Create and setup a DB schema + if _, err = db.Exec(fmt.Sprintf("CREATE SCHEMA %s", setting.Database.Schema)); err != nil { + log.Fatal("db.Exec: CREATE SCHEMA: %v", err) + } + } + + case setting.Database.UseMSSQL: + host, port := setting.ParseMSSQLHostPort(setting.Database.Host) + db, err := sql.Open("mssql", fmt.Sprintf("server=%s; port=%s; database=%s; user id=%s; password=%s;", + host, port, "master", setting.Database.User, setting.Database.Passwd)) + if err != nil { + log.Fatal("sql.Open: %v", err) + } + if _, err := db.Exec(fmt.Sprintf("If(db_id(N'%s') IS NULL) BEGIN CREATE DATABASE %s; END;", setting.Database.Name, setting.Database.Name)); err != nil { + log.Fatal("db.Exec: %v", err) + } + defer db.Close() + } + + routers.GlobalInitInstalled(graceful.GetManager().HammerContext()) +} + +func PrepareTestEnv(t testing.TB, skip ...int) func() { + t.Helper() + ourSkip := 2 + if len(skip) > 0 { + ourSkip += skip[0] + } + deferFn := PrintCurrentTest(t, ourSkip) + assert.NoError(t, unittest.LoadFixtures()) + assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) + assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath)) + ownerDirs, err := os.ReadDir(setting.RepoRootPath) + if err != nil { + assert.NoError(t, err, "unable to read the new repo root: %v\n", err) + } + for _, ownerDir := range ownerDirs { + if !ownerDir.Type().IsDir() { + continue + } + repoDirs, err := os.ReadDir(filepath.Join(setting.RepoRootPath, ownerDir.Name())) + if err != nil { + assert.NoError(t, err, "unable to read the new repo root: %v\n", err) + } + for _, repoDir := range repoDirs { + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "pack"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "info"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "heads"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "tag"), 0o755) + } + } + + return deferFn +} + +// resetFixtures flushes queues, reloads fixtures and resets test repositories within a single test. +// Most tests should call defer tests.PrepareTestEnv(t)() (or have onGiteaRun do that for them) but sometimes +// within a single test this is required +func ResetFixtures(t *testing.T) { + assert.NoError(t, queue.GetManager().FlushAll(context.Background(), -1)) + assert.NoError(t, unittest.LoadFixtures()) + assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) + assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath)) + ownerDirs, err := os.ReadDir(setting.RepoRootPath) + if err != nil { + assert.NoError(t, err, "unable to read the new repo root: %v\n", err) + } + for _, ownerDir := range ownerDirs { + if !ownerDir.Type().IsDir() { + continue + } + repoDirs, err := os.ReadDir(filepath.Join(setting.RepoRootPath, ownerDir.Name())) + if err != nil { + assert.NoError(t, err, "unable to read the new repo root: %v\n", err) + } + for _, repoDir := range repoDirs { + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "pack"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "objects", "info"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "heads"), 0o755) + _ = os.MkdirAll(filepath.Join(setting.RepoRootPath, ownerDir.Name(), repoDir.Name(), "refs", "tag"), 0o755) + } + } +} diff --git a/integrations/testlogger.go b/tests/testlogger.go similarity index 91% rename from integrations/testlogger.go rename to tests/testlogger.go index 373ad80752d3..b65573a771c4 100644 --- a/integrations/testlogger.go +++ b/tests/testlogger.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package integrations +package tests import ( "context" @@ -21,8 +21,8 @@ import ( var ( prefix string - slowTest = 10 * time.Second - slowFlush = 5 * time.Second + SlowTest = 10 * time.Second + SlowFlush = 5 * time.Second ) // TestLogger is a logger which will write to the testing log @@ -30,7 +30,7 @@ type TestLogger struct { log.WriterLogger } -var writerCloser = &testLoggerWriterCloser{} +var WriterCloser = &testLoggerWriterCloser{} type testLoggerWriterCloser struct { sync.RWMutex @@ -119,21 +119,21 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() { } else { fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", t.Name(), strings.TrimPrefix(filename, prefix), line) } - writerCloser.setT(&t) + WriterCloser.setT(&t) return func() { took := time.Since(start) - if took > slowTest { + if took > SlowTest { if log.CanColorStdout { fmt.Fprintf(os.Stdout, "+++ %s is a slow test (took %v)\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgYellow)), fmt.Formatter(log.NewColoredValue(took, log.Bold, log.FgYellow))) } else { fmt.Fprintf(os.Stdout, "+++ %s is a slow test (took %v)\n", t.Name(), took) } } - timer := time.AfterFunc(slowFlush, func() { + timer := time.AfterFunc(SlowFlush, func() { if log.CanColorStdout { - fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgRed)), slowFlush) + fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgRed)), SlowFlush) } else { - fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", t.Name(), slowFlush) + fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", t.Name(), SlowFlush) } }) if err := queue.GetManager().FlushAll(context.Background(), 2*time.Minute); err != nil { @@ -141,14 +141,14 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() { } timer.Stop() flushTook := time.Since(start) - took - if flushTook > slowFlush { + if flushTook > SlowFlush { if log.CanColorStdout { fmt.Fprintf(os.Stdout, "+++ %s had a slow clean-up flush (took %v)\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgRed)), fmt.Formatter(log.NewColoredValue(flushTook, log.Bold, log.FgRed))) } else { fmt.Fprintf(os.Stdout, "+++ %s had a slow clean-up flush (took %v)\n", t.Name(), flushTook) } } - _ = writerCloser.Close() + _ = WriterCloser.Close() } } @@ -177,7 +177,7 @@ func (log *TestLogger) Init(config string) error { if err != nil { return err } - log.NewWriterLogger(writerCloser) + log.NewWriterLogger(WriterCloser) return nil } @@ -203,5 +203,5 @@ func (log *TestLogger) GetName() string { func init() { log.Register("test", NewTestLogger) _, filename, _, _ := runtime.Caller(0) - prefix = strings.TrimSuffix(filename, "integrations/testlogger.go") + prefix = strings.TrimSuffix(filename, "tests/integration/testlogger.go") } From 2dbed4bd9759cbcc4acbe0864e81c7bf3f48b3de Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 3 Sep 2022 05:59:10 +0800 Subject: [PATCH 04/22] Fix the quick-submit for pending review comment (#20992) If there is only one "Add comment" button (when there are pending review comments), the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked. Close #20990 --- templates/repo/diff/comment_form.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index b3b211bdb3fb..9325c754cedb 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -29,6 +29,8 @@ {{else}} {{if $.root.CurrentReview}} + {{/* if there is only one "Add comment" button, the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked */}} + {{else}} From b8818a1c685870d774e956f0d6980784225225c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos?= Date: Sat, 3 Sep 2022 00:00:18 +0200 Subject: [PATCH 05/22] fix: PackageMetadataVersion deps (#21017) Set DevDependencies, PeerDependencies & OptionalDependencies in npm package metadatas Fix #21013 --- routers/api/packages/npm/api.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/routers/api/packages/npm/api.go b/routers/api/packages/npm/api.go index 4b6b803971b7..763c595152ec 100644 --- a/routers/api/packages/npm/api.go +++ b/routers/api/packages/npm/api.go @@ -55,15 +55,18 @@ func createPackageMetadataVersion(registryURL string, pd *packages_model.Package metadata := pd.Metadata.(*npm_module.Metadata) return &npm_module.PackageMetadataVersion{ - ID: fmt.Sprintf("%s@%s", pd.Package.Name, pd.Version.Version), - Name: pd.Package.Name, - Version: pd.Version.Version, - Description: metadata.Description, - Author: npm_module.User{Name: metadata.Author}, - Homepage: metadata.ProjectURL, - License: metadata.License, - Dependencies: metadata.Dependencies, - Readme: metadata.Readme, + ID: fmt.Sprintf("%s@%s", pd.Package.Name, pd.Version.Version), + Name: pd.Package.Name, + Version: pd.Version.Version, + Description: metadata.Description, + Author: npm_module.User{Name: metadata.Author}, + Homepage: metadata.ProjectURL, + License: metadata.License, + Dependencies: metadata.Dependencies, + DevDependencies: metadata.DevelopmentDependencies, + PeerDependencies: metadata.PeerDependencies, + OptionalDependencies: metadata.OptionalDependencies, + Readme: metadata.Readme, Dist: npm_module.PackageDistribution{ Shasum: pd.Files[0].Blob.HashSHA1, Integrity: "sha512-" + base64.StdEncoding.EncodeToString(hashBytes), From 96a9e15dffdd612fa78801bd2a1e3d27fdd17bb1 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Sat, 3 Sep 2022 00:06:54 +0200 Subject: [PATCH 06/22] Show language name on hover (#20923) Each repo has a bar which shows the used programming languages. If you want to know, what language is behind a color, you need to click the bar. With this PR, you just need to hover over the color the view the name. --- templates/repo/sub_menu.tmpl | 2 +- web_src/js/modules/tippy.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index cf017caaffca..7ba234dccfad 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -39,7 +39,7 @@
{{range .LanguageStats}} -
 
+
 
{{end}}
{{end}} diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js index 44e97e2a0fd4..7fc273d1cc3e 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.js @@ -3,7 +3,7 @@ import tippy from 'tippy.js'; export function createTippy(target, opts = {}) { const instance = tippy(target, { appendTo: document.body, - placement: 'top-start', + placement: target.getAttribute('data-placement') || 'top-start', animation: false, allowHTML: false, maxWidth: 500, // increase over default 350px From 18046eb91e21e03d475f3990e59516b46b6f67e2 Mon Sep 17 00:00:00 2001 From: JakobDev Date: Sat, 3 Sep 2022 00:21:09 +0000 Subject: [PATCH 07/22] [skip ci] Updated translations via Crowdin --- options/locale/locale_es-ES.ini | 4 +- options/locale/locale_fr-FR.ini | 69 ++++++++++++++++++++++++--------- options/locale/locale_tr-TR.ini | 4 ++ 3 files changed, 57 insertions(+), 20 deletions(-) diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini index f1c4d2120bba..637f88c9bd80 100644 --- a/options/locale/locale_es-ES.ini +++ b/options/locale/locale_es-ES.ini @@ -2227,7 +2227,7 @@ release.content=Contenido release.prerelease_desc=Marcar como Pre-Lanzamiento release.prerelease_helper=Marcar este lanzamiento como no es adecuada para usar en producción. release.cancel=Cancelar -release.publish=Publicar Release +release.publish=Publicar lanzamiento release.save_draft=Guardar borrador release.edit_release=Actualizar Lanzamiento release.delete_release=Eliminar Lanzamiento @@ -3131,6 +3131,8 @@ rubygems.dependencies.development=Dependencias de desarrollo rubygems.required.ruby=Requiere versión Ruby rubygems.required.rubygems=Requiere la versión de RubyGem rubygems.documentation=Para obtener más información sobre el registro de RubyGems, consulte la documentación. +vagrant.install=Para añadir un paquete Vagrant, ejecuta el siguiente comando: +vagrant.documentation=Para más información sobre el registro de paquetes Vagrant, revisa la documentación. settings.link=Vincular este paquete a un repositorio settings.link.description=Si enlaza un paquete con un repositorio, el paquete se enumera en la lista de paquetes del repositorio. settings.link.select=Seleccionar repositorio diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index 80ded69cf70a..053c2da21408 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -277,6 +277,7 @@ org_no_results=Aucune organisation correspondante n'a été trouvée. code_no_results=Aucun code source correspondant à votre terme de recherche n'a été trouvé. code_search_results=Résultats de recherche pour "%s" code_last_indexed_at=Dernière indexation %s +relevant_repositories_tooltip=Les dépôts qui sont des forks ou qui n'ont aucun sujet, aucune icône et aucune description sont cachés. [auth] @@ -377,6 +378,7 @@ issue_assigned.pull=@%[1]s vous a assigné à la demande d’ajout %[2]s dans le issue_assigned.issue=@%[1]s vous a assigné le ticket %[2]s dans le dépôt %[3]s. issue.x_mentioned_you=@%s vous a mentionné: +issue.action.force_push=%[1]s a forcé la mise à jour de %[2]s depuis %[3]s vers %[4]s. issue.action.approve=@%[1]s a approuvé cette demande d'ajout. issue.action.reject=@%[1]s a demandé des modifications sur cette demande d'ajout. issue.action.review=@%[1]s a commenté sur cette demande d'ajout. @@ -436,8 +438,10 @@ size_error=` doit être à la taille de %s.` min_size_error=` %s caractères minimum ` max_size_error=` %s caractères maximum ` email_error=` adresse e-mail invalide ` +url_error=`'%s' n'est pas une URL valide.` include_error=`doit contenir la sous-chaîne '%s'.` glob_pattern_error=` le motif de développement est invalide : %s.` +regex_pattern_error=` le motif regex est invalide : %s.` unknown_error=Erreur inconnue : captcha_incorrect=Le code CAPTCHA est incorrect. password_not_match=Les mots de passe ne correspondent pas. @@ -482,6 +486,7 @@ auth_failed=Échec d'authentification : %v still_own_repo=Ce compte possède toujours un ou plusieurs dépôts, vous devez d'abord les supprimer ou les transférer. still_has_org=Votre compte est un membre d’une ou plusieurs organisations, veuillez d'abord les quitter. org_still_own_repo=Cette organisation possède encore un ou plusieurs dépôts. Vous devez d'abord les supprimer ou les transférer. +org_still_own_packages=Cette organisation possède encore un ou plusieurs paquets. Vous devez d'abord les supprimer. target_branch_not_exist=La branche cible n'existe pas. @@ -522,6 +527,7 @@ twofa=Authentification à deux facteurs account_link=Comptes associés organization=Organisations uid=ID d'Utilisateur +webauthn=Clés de sécurité public_profile=Profil public biography_placeholder=Parlez-nous un peu de vous @@ -632,6 +638,8 @@ ssh_key_been_used=Cette clef SSH a déjà été ajoutée au serveur. ssh_key_name_used=Une clé SSH avec le même nom existe déjà sur votre compte. ssh_principal_been_used=Ce principal a déjà été ajouté au serveur. gpg_key_id_used=Une clef GPG publique avec le même identifiant existe déjà. +gpg_no_key_email_found=Cette clé GPG ne correspond à aucune adresse e-mail activée et associée avec votre compte. Elle peut toujours être ajoutée si vous signez le jeton fourni. +gpg_key_matched_identities=Identités correspondantes : gpg_key_verified=Clé vérifiée gpg_key_verify=Vérifier gpg_invalid_token_signature=La clé GPG fournie, la signature et le jeton ne correspondent pas ou le jeton n'est pas à jour. @@ -641,6 +649,9 @@ gpg_token_help=Vous pouvez générer une signature en utilisant : gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig gpg_token_signature=Signature GPG renforcée key_signature_gpg_placeholder=Commence par '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=La clef GPG '%s' a été vérifiée. +ssh_key_verified=Clé vérifiée +ssh_key_verify=Vérifier ssh_token_required=Vous devez fournir une signature pour le jeton ci-dessous ssh_token=Jeton ssh_token_help=Vous pouvez générer une signature en utilisant : @@ -747,10 +758,14 @@ passcode_invalid=Le mot de passe est invalide. Réessayez. twofa_enrolled=L'authentification à deux facteurs a été activée pour votre compte. Gardez votre jeton de secours (%s) en lieu sûr car il ne vous sera montré qu'une seule fois ! twofa_failed_get_secret=Impossible d'obtenir le secret. +webauthn_register_key=Ajouter une clé de sécurité +webauthn_nickname=Pseudonyme +webauthn_delete_key=Supprimer la clé de sécurité manage_account_links=Gérer les comptes liés manage_account_links_desc=Ces comptes externes sont liés à votre compte Gitea. account_links_not_available=Il n'y a pour l'instant pas de compte externe connecté à votre compte Gitea. +link_account=Lier un Compte remove_account_link=Supprimer un compte lié remove_account_link_desc=Supprimer un compte lié révoquera son accès à votre compte Gitea. Continuer ? remove_account_link_success=Le compte lié a été supprimé. @@ -829,6 +844,7 @@ default_branch_helper=La branche par défaut est la branche de base pour les dem mirror_prune=Purger mirror_prune_desc=Supprimer les références externes obsolètes mirror_interval_invalid=L'intervalle de synchronisation est invalide. +mirror_sync_on_commit=Synchroniser quand les commits sont poussés mirror_address=Cloner depuis une URL mirror_address_desc=Insérez tous les identifiants requis dans la section Autorisation. mirror_address_url_invalid=L'url fournie est invalide. Vous devez échapper tous les composants de l'url correctement. @@ -896,6 +912,7 @@ form.name_pattern_not_allowed="%s" n'est pas autorisé dans un nom de dépôt. need_auth=Autorisation migrate_options=Options de migration migrate_service=Service de migration +migrate_options_mirror_helper=Ce dépôt sera un miroir migrate_options_lfs=Migrer les fichiers LFS migrate_options_lfs_endpoint.label=Point d'accès LFS migrate_options_lfs_endpoint.description=La migration va tenter d'utiliser votre dépôt Git distant pour déterminer le serveur LFS. Vous pouvez également spécifier un point d'accès personnalisé si les données LFS du dépôt sont stockées ailleurs. @@ -924,11 +941,14 @@ migrate.migrate=Migrer depuis %s migrate.migrating=Migration de %s ... migrate.migrating_failed=La migration de %s a échoué. migrate.migrating_failed.error=Erreur: %s +migrate.migrating_failed_no_addr=Échec de la migration. +migrate.github.description=Migrer les données depuis github.com ou d’autres instances de GitHub. migrate.git.description=Migrer uniquement un dépôt depuis n’importe quel service Git. migrate.gitlab.description=Migrer les données depuis gitlab.com ou d’autres instances de GitLab. migrate.gitea.description=Migrer les données depuis gitea.com ou d’autres instances de Gitea. migrate.gogs.description=Migrer les données depuis notabug.org ou d’autres instances de Gogs. migrate.onedev.description=Migrer les données depuis code.onedev.io ou d’autre instance de OneDev. +migrate.codebase.description=Migrer les données depuis codebasehq.com. migrate.migrating_git=Migration des données Git migrate.migrating_topics=Migration des sujets migrate.migrating_milestones=Migration des jalons @@ -970,6 +990,7 @@ tags=Tags issues=Tickets pulls=Demandes d'ajout project_board=Projets +packages=Paquets labels=Étiquettes org_labels_desc=Les étiquettes de niveau d'une organisation peuvent être utilisés avec tous les dépôts de cette organisation org_labels_desc_manage=gérer @@ -989,10 +1010,14 @@ file_view_rendered=Voir le rendu file_view_raw=Voir le Raw file_permalink=Lien permanent file_too_large=Le fichier est trop gros pour être affiché. +invisible_runes_header=`Ce fichier contient des caractères Unicode invisibles !` +ambiguous_runes_header=`Ce fichier contient des caractères Unicode ambigus !` invisible_runes_line=`Cette ligne contient des caractères Unicode invisibles` ambiguous_runes_line=`Cette ligne contient des caractères Unicode ambigus` ambiguous_character=`%[1]c [U+%04[1]X] peut être confondu avec %[2]c [U+%04[2]X]` +escape_control_characters=Échapper +unescape_control_characters=Annuler l'échappement file_copy_permalink=Copier le lien permanent video_not_supported_in_browser=Votre navigateur ne supporte pas le tag HTML5 "video". audio_not_supported_in_browser=Votre navigateur ne supporte pas la balise « audio » HTML5. @@ -1500,6 +1525,7 @@ pulls.rebase_conflict_summary=Message d'erreur pulls.unrelated_histories=Échec de la fusion: La tête de fusion et la base ne partagent pas d'historique commun. Indice : Essayez une stratégie différente pulls.merge_out_of_date=Échec de la fusion: La base a été mise à jour en cours de fusion. Indice : Réessayez. pulls.push_rejected_summary=Message de rejet complet +pulls.push_rejected_no_message=Échec de la fusion : La poussée a été rejetée mais il n'y avait pas de message distant.
Revoyez les Git Hooks pour ce dépot pulls.open_unmerged_pull_exists=`Vous ne pouvez pas ré-ouvrir cette demande de fusion car il y a une demande de fusion (#%d) en attente avec des propriétés identiques.` pulls.status_checking=Certains contrôles sont en attente pulls.status_checks_success=Tous les contrôles ont réussi @@ -1679,7 +1705,7 @@ settings.collaboration.write=Écriture settings.collaboration.read=Lecture settings.collaboration.owner=Propriétaire settings.collaboration.undefined=Indéfini -settings.hooks=Déclencheurs Web +settings.hooks=Webhooks settings.githooks=Déclencheurs Git settings.basic_settings=Paramètres de base settings.mirror_settings=Réglages Miroir @@ -1802,13 +1828,13 @@ settings.search_team=Rechercher une équipe… settings.change_team_permission_tip=La permission de l'équipe est définie sur la page de configuration de l'équipe et ne peut pas être modifiée par dépôt settings.delete_team_tip=Cette équipe a accès à tous les dépôts et ne peut pas être supprimée settings.remove_team_success=L'accès de l'équipe au dépôt a été supprimé. -settings.add_webhook=Ajouter un déclencheur Web +settings.add_webhook=Ajouter un Webhook settings.add_webhook.invalid_channel_name=Le nom du canal Webhook ne peut pas être vide et ne peut pas contenir seulement un caractère #. settings.hooks_desc=Les Webhooks font automatiquement des requêtes HTTP POST à un serveur lorsque certains événements Gitea se déclenchent. Lire la suite dans le guide des Webhooks. settings.webhook_deletion=Retirer le Webhook settings.webhook_deletion_desc=Supprimer un webhook supprime ses paramètres et son historique. Continuer ? settings.webhook_deletion_success=Le webhook a été supprimé. -settings.webhook.test_delivery=Tester la version +settings.webhook.test_delivery=Tester l'envoi settings.webhook.test_delivery_desc=Testez ce webhook avec un faux événement. settings.webhook.request=Requête settings.webhook.response=Réponse @@ -1823,7 +1849,7 @@ settings.add_webhook_desc=Gitea enverra à l'URL cible des requêtes POST< settings.payload_url=URL cible settings.http_method=Méthode HTTP settings.content_type=Type de contenu POST -settings.secret=Confidentiel +settings.secret=Secret settings.slack_username=Nom d'utilisateur settings.slack_icon_url=URL de l'icône settings.discord_username=Nom d'utilisateur @@ -1833,19 +1859,19 @@ settings.event_push_only=Événements de poussée settings.event_send_everything=Tous les événements settings.event_choose=Événements personnalisés… settings.event_header_repository=Événements du dépôt -settings.event_create=Créer -settings.event_create_desc=Branche ou Tag créé. -settings.event_delete=Supprimer -settings.event_delete_desc=Branche ou étiquette supprimé. +settings.event_create=Création +settings.event_create_desc=Branche ou étiquette créé. +settings.event_delete=Suppression +settings.event_delete_desc=Branche ou étiquette supprimée. settings.event_fork=Bifurcation settings.event_fork_desc=Dépôt bifurqué. settings.event_release=Version settings.event_release_desc=Version publiée, mise à jour ou supprimée dans un dépôt. -settings.event_push=Pousser +settings.event_push=Poussée settings.event_push_desc=Git push vers un dépôt. settings.event_repository=Dépôt settings.event_repository_desc=Dépôt créé ou supprimé. -settings.event_header_issue=Événements du ticket +settings.event_header_issue=Événements des tickets settings.event_issues=Tickets settings.event_issues_desc=Ticket ouvert, fermé, ré-ouvert ou modifié. settings.event_issue_assign=Ticket assigné @@ -1853,7 +1879,7 @@ settings.event_issue_assign_desc=Ticket assigné ou non assigné. settings.event_issue_label=Étiquettes des tickets settings.event_issue_label_desc=Étiquettes de ticket mises à jour ou effacées. settings.event_issue_milestone=Ticket jalonnée -settings.event_issue_milestone_desc=Ticket jalonnée ou dé-jalonnée. +settings.event_issue_milestone_desc=Ticket jalonné ou dé-jalonné. settings.event_issue_comment=Commentaire du ticket settings.event_issue_comment_desc=Commentaire du ticket créé, modifié, ou supprimé. settings.event_header_pull_request=Événements de demande d'ajout @@ -2059,7 +2085,7 @@ release.new_subheader=Les versions organisent les versions publiées du projet. release.edit_subheader=Les versions organisent les versions publiées du projet. release.tag_name=Nom du tag release.target=Cible -release.tag_helper=Choisissez un tag existant ou créez un nouveau tag. +release.tag_helper=Choisissez une étiquette existante ou créez une nouvelle étiquette. release.title=Titre release.content=Contenu release.prerelease_desc=Marquer comme pré-version @@ -2069,12 +2095,12 @@ release.publish=Publier release.save_draft=Sauvegarder le Brouillon release.edit_release=Modifier la version release.delete_release=Supprimer cette version -release.delete_tag=Supprimer le tag +release.delete_tag=Supprimer l'étiquette release.deletion=Supprimer cette version release.deletion_success=Cette livraison a été supprimée. release.deletion_tag_success=L'étiquette a été supprimée. -release.tag_name_already_exist=Une version avec ce nom de balise existe déjà. -release.tag_name_invalid=Le nom de balise est invalide. +release.tag_name_already_exist=Une version avec ce nom d'étiquette existe déjà. +release.tag_name_invalid=Le nom de l'étiquette est invalide. release.tag_already_exist=Ce nom d'étiquette existe déjà. release.downloads=Téléchargements release.download_count=Télécharger: %s @@ -2094,7 +2120,7 @@ branch.create_from=de '%s' branch.create_success=La branche "%s" a été crée. branch.branch_already_exists=La branche '%s' existe déjà dans ce dépôt. branch.branch_name_conflict=Le nom de la branche « %s » est en conflit avec une branche existante « %s ». -branch.tag_collision=La branche '%s' ne peut être créée comme une balise car un nom identique existe déjà dans le dépôt. +branch.tag_collision=La branche '%s' ne peut être créée comme une étiquette avec un nom identique existe déjà dans le dépôt. branch.deleted_by=Supprimée par %s branch.restore_success=La branche "%s" a été restaurée. branch.restore_failed=La restauration de la branche '%s' a échoué. @@ -2169,7 +2195,7 @@ settings.delete_prompt=Cette organisation sera supprimée définitivement. Cette settings.confirm_delete_account=Confirmez la suppression settings.delete_org_title=Supprimer l'organisation settings.delete_org_desc=Cette organisation sera supprimée définitivement. Voulez-vous continuer ? -settings.hooks_desc=Vous pouvez ajouter des déclencheurs qui seront activés pour tous les dépôts de cette organisation. +settings.hooks_desc=Vous pouvez ajouter des webhooks qui seront activés pour tous les dépôts de cette organisation. settings.labels_desc=Ajouter des étiquettes qui peuvent être utilisées sur les tickets pour tous les dépôts dans cette organisation. @@ -2378,6 +2404,7 @@ repos.forks=Bifurcations repos.issues=Tickets repos.size=Taille +packages.published=Publiés systemhooks=Rappels système @@ -2676,9 +2703,9 @@ notices.system_notice_list=Informations notices.view_detail_header=Voir les détails de l'information système notices.actions=Actions notices.select_all=Tout Sélectionner -notices.deselect_all=Tous déselectionner +notices.deselect_all=Tout désélectionner notices.inverse_selection=Inverser la sélection -notices.delete_selected=Supprimé les éléments sélectionnés +notices.delete_selected=Supprimer les éléments sélectionnés notices.delete_all=Supprimer toutes les notifications notices.type=Type notices.type_1=Dépôt @@ -2704,6 +2731,7 @@ compare_commits_general=Comparer les révisions mirror_sync_delete=a synchronisé puis supprimé la nouvelle référence %[2]s vers %[3]s depuis le miroir approve_pull_request=`a approuvé %[3]s#%[2]s` reject_pull_request=`a suggérés des changements pour %[3]s#%[2]s` +publish_release=`a publié "%[4]s" à %[3]s` review_dismissed_reason=Raison : [tool] @@ -2762,4 +2790,7 @@ error.unit_not_allowed=Vous n'êtes pas autorisé à accéder à cette section d [packages] empty.repo=Avez-vous téléchargé un paquet, mais il n'est pas affiché ici? Allez dans les paramètres du paquet et liez le à ce dépôt. +published_by_in=%[1]s publié par %[3]s en %[5]s +rubygems.required.ruby=Nécessite la version de Ruby +rubygems.required.rubygems=Nécessite la version de RubyGem diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index 8d269ca83920..465c14b35ba2 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -277,6 +277,8 @@ org_no_results=Eşleşen organizasyon bulunamadı. code_no_results=Aranan terimlerle eşleşen bir kaynak kod bulunamadı. code_search_results='%s' için arama sonuçları code_last_indexed_at=Son endekslenen %s +relevant_repositories_tooltip=Çatal olan veya konusu, simgesi veya açıklaması olmayan depolar gizlenmiştir. +relevant_repositories=Sadece ilişkili depolar gösteriliyor, filtrelenmemiş sonuçları göster. [auth] @@ -3129,6 +3131,8 @@ rubygems.dependencies.development=Geliştirme Bağımlılıkları rubygems.required.ruby=Gereken Ruby sürümü rubygems.required.rubygems=Gereken RubyGem sürümü rubygems.documentation=RubyGems kütüğü hakkında daha fazla bilgi için, belgeye bakabilirsiniz. +vagrant.install=Vagrant paketi eklemek için aşağıdaki komutu çalıştırın: +vagrant.documentation=Vagrant kütüğü hakkında daha fazla bilgi için, belgeye bakabilirsiniz. settings.link=Bu paketi bir depoya bağlayın settings.link.description=Eğer bir paketi bir depoya bağlarsanız, paket deponun paket listesinde listelenecektir. settings.link.select=Depo Seç From de7b87fbc238e0685c01cb26a580b3d21cee623a Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 3 Sep 2022 10:33:34 +0100 Subject: [PATCH 08/22] Do not add links to Posters or Assignees with ID < 0 (#20577) There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0. Fix #20559 Signed-off-by: Andrew Thornton --- templates/org/team/teams.tmpl | 4 +- templates/repo/diff/comments.tmpl | 8 +- templates/repo/issue/new_form.tmpl | 4 +- .../repo/issue/view_content/comments.tmpl | 179 ++++++------------ templates/shared/user/authorlink.tmpl | 3 + templates/shared/user/avatarlink.tmpl | 3 + templates/shared/user/namelink.tmpl | 3 + 7 files changed, 76 insertions(+), 128 deletions(-) create mode 100644 templates/shared/user/authorlink.tmpl create mode 100644 templates/shared/user/avatarlink.tmpl create mode 100644 templates/shared/user/namelink.tmpl diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 465701d96ed2..5399f3a59408 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -32,9 +32,7 @@
{{range .Members}} - - {{avatar .}} - + {{template "shared/user/avatarlink" .}} {{end}}
diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 0cc7853378cc..5d298f820c27 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -5,9 +5,7 @@ {{if .OriginalAuthor}} {{else}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} {{end}}
@@ -27,9 +25,7 @@ {{else}} - - {{.Poster.GetDisplayName}} - + {{template "shared/user/namelink" .Poster}} {{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{end}} diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 91a523a1e223..ed1fd4778f7d 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -8,9 +8,7 @@
- - {{avatar .SignedUser}} - + {{template "shared/user/avatarlink" .SignedUser}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index e33981a012c4..8e0308c2d037 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -17,7 +17,7 @@ {{if .OriginalAuthor}} {{else}} - + {{avatar .Poster}} {{end}} @@ -96,11 +96,9 @@ {{else if eq .Type 1}}
{{svg "octicon-dot-fill"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if .Issue.IsPull}} {{$.locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}} {{else}} @@ -111,11 +109,9 @@ {{else if eq .Type 2}}
{{svg "octicon-circle-slash"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if .Issue.IsPull}} {{$.locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}} {{else}} @@ -126,11 +122,9 @@ {{else if eq .Type 28}}
{{svg "octicon-git-merge"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$link := printf "%s/commit/%s" $.Repository.HTMLURL ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{if eq $.Issue.PullRequest.Status 3}} {{$.locale.Tr "repo.issues.manually_pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Str2html}} @@ -155,12 +149,10 @@ {{$createdStr:= TimeSinceUnix .CreatedUnix $.locale}}
{{svg "octicon-bookmark"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} {{if eq .RefAction 3}}{{end}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentHTMLURL|Escape) $refFrom | Safe}} {{if eq .RefAction 3}}{{end}} @@ -172,11 +164,9 @@ {{else if eq .Type 4}}
{{svg "octicon-bookmark"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
@@ -188,11 +178,9 @@ {{if or .AddedLabels .RemovedLabels}}
{{svg "octicon-tag"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if and .AddedLabels (not .RemovedLabels)}} {{$.locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels .AddedLabels) $createdStr | Safe}} {{else if and (not .AddedLabels) .RemovedLabels}} @@ -206,11 +194,9 @@ {{else if eq .Type 8}}
{{svg "octicon-milestone"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
@@ -219,11 +205,9 @@ {{svg "octicon-person"}} {{if gt .AssigneeID 0}} {{if .RemovedAssignee}} - - {{avatar .Assignee}} - + {{template "shared/user/avatarlink" .Assignee}} - {{.Assignee.GetDisplayName}} + {{.Assignee.GetDisplayName}} {{if eq .Poster.ID .Assignee.ID}} {{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{else}} @@ -231,11 +215,9 @@ {{end}} {{else}} - - {{avatar .Assignee}} - + {{template "shared/user/avatarlink" .Assignee}} - {{.Assignee.GetDisplayName}} + {{template "shared/user/authorlink" .Assignee}} {{if eq .Poster.ID .AssigneeID}} {{$.locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}} {{else}} @@ -248,44 +230,36 @@ {{else if eq .Type 10}}
{{svg "octicon-pencil"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}}
{{else if eq .Type 11}}
{{svg "octicon-git-branch"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
{{else if eq .Type 12}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
{{else if eq .Type 13}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} {{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}} @@ -297,11 +271,9 @@ {{else if eq .Type 14}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}} {{template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" .}} @@ -313,33 +285,27 @@ {{else if eq .Type 15}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
{{else if eq .Type 16}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
{{else if eq .Type 17}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$parsedDeadline := .Content | ParseDeadline}} {{$.locale.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}} @@ -347,22 +313,18 @@ {{else if eq .Type 18}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
{{else if eq .Type 19}}
{{svg "octicon-package-dependents"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}} {{if .DependentIssue}} @@ -383,11 +345,9 @@ {{else if eq .Type 20}}
{{svg "octicon-package-dependents"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}} {{if .DependentIssue}} @@ -424,7 +384,7 @@ {{if $.Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}} {{else}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{end}} {{if eq .Review.Type 1}} @@ -455,7 +415,7 @@ {{if $.Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}} {{else}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{end}} {{$.locale.Tr "repo.issues.review.left_comment" | Safe}} @@ -583,7 +543,7 @@ {{if $.Repository.OriginalURL}} ({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}} {{else}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{end}} {{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}} @@ -668,17 +628,15 @@ {{else if eq .Type 23}}
{{svg "octicon-lock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} {{if .Content}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} {{else}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} {{end}} @@ -686,33 +644,28 @@ {{else if eq .Type 24}}
{{svg "octicon-key"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$.locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
{{else if eq .Type 25}}
{{svg "octicon-git-branch"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.Name}} + {{.Poster.Name}} {{$.locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{else if eq .Type 26}}
{{svg "octicon-clock"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} + {{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}}
@@ -723,11 +676,9 @@ {{else if eq .Type 27}}
{{svg "octicon-eye"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if (gt .AssigneeID 0)}} {{if .RemovedAssignee}} {{if eq .PosterID .AssigneeID}} @@ -751,7 +702,7 @@
{{svg "octicon-repo-push"}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if .IsForcePush}} {{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}} {{else}} @@ -766,11 +717,9 @@ {{if not $.UnitProjectsGlobalDisabled}}
{{svg "octicon-project"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if gt .OldProjectID 0}} {{if gt .ProjectID 0}} {{$.locale.Tr "repo.issues.change_project_at" (.OldProject.Title|Escape) (.Project.Title|Escape) $createdStr | Safe}} @@ -791,7 +740,7 @@ {{svg "octicon-x" 16}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{$reviewerName := ""}} {{if eq .Review.OriginalAuthor ""}} {{$reviewerName = .Review.Reviewer.Name}} @@ -825,11 +774,9 @@ {{else if eq .Type 33}}
{{svg "octicon-git-branch"}} - - {{avatar .Poster}} - + {{template "shared/user/avatarlink" .Poster}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if and .OldRef .NewRef}} {{$.locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}} {{else if .OldRef}} @@ -843,7 +790,7 @@
{{svg "octicon-git-merge" 16}} - {{.Poster.GetDisplayName}} + {{template "shared/user/authorlink" .Poster}} {{if eq .Type 34}}{{$.locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}} {{else}}{{$.locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}} diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl new file mode 100644 index 000000000000..81c2a4ed5e50 --- /dev/null +++ b/templates/shared/user/authorlink.tmpl @@ -0,0 +1,3 @@ + + {{.GetDisplayName}} + diff --git a/templates/shared/user/avatarlink.tmpl b/templates/shared/user/avatarlink.tmpl new file mode 100644 index 000000000000..40f5ee71297f --- /dev/null +++ b/templates/shared/user/avatarlink.tmpl @@ -0,0 +1,3 @@ + + {{avatar .}} + diff --git a/templates/shared/user/namelink.tmpl b/templates/shared/user/namelink.tmpl new file mode 100644 index 000000000000..25dff36a7880 --- /dev/null +++ b/templates/shared/user/namelink.tmpl @@ -0,0 +1,3 @@ + + {{.GetDisplayName}} + From e7b5bf0d96a1e860f1ab1414c413c5656f7efc70 Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Sat, 3 Sep 2022 17:43:27 +0800 Subject: [PATCH 09/22] Add down key check has tribute container (#21016) Fixes an issue where users would not be able to select by pressing the down arrow when using @TAG above a message Bug videos: https://user-images.githubusercontent.com/1255041/188095999-c4ccde18-e53b-4251-8a14-d90c4042d768.mp4 --- web_src/js/features/comp/EasyMDE.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web_src/js/features/comp/EasyMDE.js b/web_src/js/features/comp/EasyMDE.js index 015fc3505082..1f7fe45153cc 100644 --- a/web_src/js/features/comp/EasyMDE.js +++ b/web_src/js/features/comp/EasyMDE.js @@ -92,6 +92,18 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) { } cm.execCommand('delCharBefore'); }, + Up: (cm) => { + const tributeContainer = document.querySelector('.tribute-container'); + if (!tributeContainer || tributeContainer.style.display === 'none') { + return cm.execCommand('goLineUp'); + } + }, + Down: (cm) => { + const tributeContainer = document.querySelector('.tribute-container'); + if (!tributeContainer || tributeContainer.style.display === 'none') { + return cm.execCommand('goLineDown'); + } + }, }); await attachTribute(inputField, {mentions: true, emoji: true}); attachEasyMDEToElements(easyMDE); From 1670109b91a6d5cfb4da0225d7a52c423031322d Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 3 Sep 2022 17:24:18 +0200 Subject: [PATCH 10/22] Improve arc-green code theme (#21039) - Increase contrasts overall - Add various missing theme classes - Ensure strings and constants are colored the same across languages Before: Screen Shot 2022-09-03 at 15 20 19 Screen Shot 2022-09-03 at 15 10 12 After: Screen Shot 2022-09-03 at 15 19 31 image --- web_src/less/chroma/dark.less | 131 +++++++++++++++++---------------- web_src/less/chroma/light.less | 76 +++++++++---------- 2 files changed, 105 insertions(+), 102 deletions(-) diff --git a/web_src/less/chroma/dark.less b/web_src/less/chroma/dark.less index 67531ec96241..4be9cf7912e0 100644 --- a/web_src/less/chroma/dark.less +++ b/web_src/less/chroma/dark.less @@ -1,67 +1,70 @@ +.chroma .bp { color: #fabd2f; } /* NameBuiltinPseudo */ +.chroma .c { color: #777e94; } /* Comment */ +.chroma .c1 { color: #777e94; } /* CommentSingle */ +.chroma .ch { color: #777e94; } /* CommentHashbang */ +.chroma .cm { color: #777e94; } /* CommentMultiline */ +.chroma .cp { color: #8ec07c; } /* CommentPreproc */ +.chroma .cpf { color: #649bc4; } /* CommentPreprocFile */ +.chroma .cs { color: #9075cd; } /* CommentSpecial */ +.chroma .dl { color: #649bc4; } /* LiteralStringDelimiter */ +.chroma .gd { color: #ffffff; background-color: #5f3737; } /* GenericDeleted */ +.chroma .ge { color: #ddee30; } /* GenericEmph */ +.chroma .gh { color: #ffaa10; } /* GenericHeading */ +.chroma .gi { color: #ffffff; background-color: #3a523a; } /* GenericInserted */ +.chroma .go { color: #777e94; } /* GenericOutput */ +.chroma .gp { color: #ebdbb2; } /* GenericPrompt */ +.chroma .gr { color: #ff4433; } /* GenericError */ +.chroma .gs { color: #ebdbb2; } /* GenericStrong */ +.chroma .gt { color: #ff7540; } /* GenericTraceback */ +.chroma .gu { color: #b8bb26; } /* GenericSubheading */ .chroma .hl { background-color: #3f424d; } /* LineHighlight */ -.chroma .lnt { color: #7f7f7f; } /* LineNumbersTable */ -.chroma .ln { color: #7f7f7f; } /* LineNumbers */ -.chroma .k { color: #f63; } /* Keyword */ -.chroma .kc { color: #fa1; } /* KeywordConstant */ -.chroma .kd { color: #9daccc; } /* KeywordDeclaration */ -.chroma .kn { color: #fa1; } /* KeywordNamespace */ +.chroma .il { color: #649bc4; } /* LiteralNumberIntegerLong */ +.chroma .k { color: #ff7540; } /* Keyword */ +.chroma .kc { color: #649bc4; } /* KeywordConstant */ +.chroma .kd { color: #ff7540; } /* KeywordDeclaration */ +.chroma .kn { color: #ffaa10; } /* KeywordNamespace */ .chroma .kp { color: #5f8700; } /* KeywordPseudo */ -.chroma .kr { color: #f63; } /* KeywordReserved */ -.chroma .kt { color: #9daccc; } /* KeywordType */ -.chroma .na { color: #8a8a8a; } /* NameAttribute */ -.chroma .nb { color: #9daccc; } /* NameBuiltin */ -.chroma .bp { color: #9daccc; } /* NameBuiltinPseudo */ -.chroma .nc { color: #fa1; } /* NameClass */ -.chroma .no { color: #fa1; } /* NameConstant */ -.chroma .nd { color: #9daccc; } /* NameDecorator */ -.chroma .ni { color: #fa1; } /* NameEntity */ -.chroma .ne { color: #af8700; } /* NameException */ -.chroma .nf { color: #9daccc; } /* NameFunction */ -.chroma .nl { color: #fa1; } /* NameLabel */ -.chroma .nn { color: #fa1; } /* NameNamespace */ -.chroma .nx { color: #9daccc; } /* NameOther */ -.chroma .nt { color: #9daccc; } /* NameTag */ -.chroma .nv { color: #9daccc; } /* NameVariable */ -.chroma .vc { color: #f81; } /* NameVariableClass */ -.chroma .vg { color: #fa1; } /* NameVariableGlobal */ -.chroma .vi { color: #fa1; } /* NameVariableInstance */ -.chroma .s { color: #1af; } /* LiteralString */ -.chroma .sa { color: #1af; } /* LiteralStringAffix */ -.chroma .sb { color: #a0cc75; } /* LiteralStringBacktick */ -.chroma .sc { color: #1af; } /* LiteralStringChar */ -.chroma .dl { color: #1af; } /* LiteralStringDelimiter */ -.chroma .sd { color: #6a737d; } /* LiteralStringDoc */ -.chroma .s2 { color: #a0cc75; } /* LiteralStringDouble */ -.chroma .se { color: #f63; } /* LiteralStringEscape */ -.chroma .sh { color: #1af; } /* LiteralStringHeredoc */ -.chroma .si { color: #fa1; } /* LiteralStringInterpol */ -.chroma .sx { color: #fa1; } /* LiteralStringOther */ -.chroma .sr { color: #97c; } /* LiteralStringRegex */ -.chroma .s1 { color: #a0cc75; } /* LiteralStringSingle */ -.chroma .ss { color: #fa1; } /* LiteralStringSymbol */ -.chroma .m { color: #1af; } /* LiteralNumber */ -.chroma .mb { color: #1af; } /* LiteralNumberBin */ -.chroma .mf { color: #1af; } /* LiteralNumberFloat */ -.chroma .mh { color: #1af; } /* LiteralNumberHex */ -.chroma .mi { color: #1af; } /* LiteralNumberInteger */ -.chroma .il { color: #1af; } /* LiteralNumberIntegerLong */ -.chroma .mo { color: #1af; } /* LiteralNumberOct */ -.chroma .o { color: #f63; } /* Operator */ +.chroma .kr { color: #ff7540; } /* KeywordReserved */ +.chroma .kt { color: #fabd2f; } /* KeywordType */ +.chroma .ln { color: #7f8699; } /* LineNumbers */ +.chroma .lnt { color: #7f8699; } /* LineNumbersTable */ +.chroma .m { color: #649bc4; } /* LiteralNumber */ +.chroma .mb { color: #649bc4; } /* LiteralNumberBin */ +.chroma .mf { color: #649bc4; } /* LiteralNumberFloat */ +.chroma .mh { color: #649bc4; } /* LiteralNumberHex */ +.chroma .mi { color: #649bc4; } /* LiteralNumberInteger */ +.chroma .mo { color: #649bc4; } /* LiteralNumberOct */ +.chroma .n { color: #fabd2f; } /* Name */ +.chroma .na { color: #b8bb26; } /* NameAttribute */ +.chroma .nb { color: #fabd2f; } /* NameBuiltin */ +.chroma .nc { color: #ffaa10; } /* NameClass */ +.chroma .nd { color: #8ec07c; } /* NameDecorator */ +.chroma .ne { color: #ff7540; } /* NameException */ +.chroma .nf { color: #fabd2f; } /* NameFunction */ +.chroma .ni { color: #fabd2f; } /* NameEntity */ +.chroma .nl { color: #ff7540; } /* NameLabel */ +.chroma .nn { color: #ffaa10; } /* NameNamespace */ +.chroma .no { color: #649bc4; } /* NameConstant */ +.chroma .nt { color: #ff7540; } /* NameTag */ +.chroma .nv { color: #ebdbb2; } /* NameVariable */ +.chroma .nx { color: #b6bac5; } /* NameOther */ +.chroma .o { color: #ff7540; } /* Operator */ .chroma .ow { color: #5f8700; } /* OperatorWord */ -.chroma .c { color: #6a737d; } /* Comment */ -.chroma .ch { color: #6a737d; } /* CommentHashbang */ -.chroma .cm { color: #6a737d; } /* CommentMultiline */ -.chroma .c1 { color: #6a737d; } /* CommentSingle */ -.chroma .cs { color: #95ad; } /* CommentSpecial */ -.chroma .cp { color: #fc6; } /* CommentPreproc */ -.chroma .cpf { color: #03dfff; } /* CommentPreprocFile */ -.chroma .gd { color: #fff; background-color: #5f3737; } /* GenericDeleted */ -.chroma .ge { color: #ef5; } /* GenericEmph */ -.chroma .gr { color: #f33; } /* GenericError */ -.chroma .gh { color: #fa1; } /* GenericHeading */ -.chroma .gi { color: #fff; background-color: #3a523a; } /* GenericInserted */ -.chroma .go { color: #888888; } /* GenericOutput */ -.chroma .gp { color: #555555; } /* GenericPrompt */ -.chroma .gu { color: #9daccc; } /* GenericSubheading */ -.chroma .gt { color: #f63; } /* GenericTraceback */ -.chroma .w { color: #bbbbbb; } /* TextWhitespace */ +.chroma .p { color: #d2d4db; } /* Punctuation */ +.chroma .s { color: #b8bb26; } /* LiteralString */ +.chroma .s1 { color: #b8bb26; } /* LiteralStringSingle */ +.chroma .s2 { color: #b8bb26; } /* LiteralStringDouble */ +.chroma .sa { color: #649bc4; } /* LiteralStringAffix */ +.chroma .sb { color: #b8bb26; } /* LiteralStringBacktick */ +.chroma .sc { color: #649bc4; } /* LiteralStringChar */ +.chroma .sd { color: #777e94; } /* LiteralStringDoc */ +.chroma .se { color: #ff7540; } /* LiteralStringEscape */ +.chroma .sh { color: #649bc4; } /* LiteralStringHeredoc */ +.chroma .si { color: #ffaa10; } /* LiteralStringInterpol */ +.chroma .sr { color: #9075cd; } /* LiteralStringRegex */ +.chroma .ss { color: #ff7540; } /* LiteralStringSymbol */ +.chroma .sx { color: #ffaa10; } /* LiteralStringOther */ +.chroma .vc { color: #ff7540; } /* NameVariableClass */ +.chroma .vg { color: #ffaa10; } /* NameVariableGlobal */ +.chroma .vi { color: #ffaa10; } /* NameVariableInstance */ +.chroma .w { color: #7f8699; } /* TextWhitespace */ diff --git a/web_src/less/chroma/light.less b/web_src/less/chroma/light.less index 9728800765b4..2e811844c2dd 100644 --- a/web_src/less/chroma/light.less +++ b/web_src/less/chroma/light.less @@ -1,6 +1,23 @@ +.chroma .bp { color: #999999; } /* NameBuiltinPseudo */ +.chroma .c { color: #6a737d; } /* Comment */ +.chroma .c1 { color: #6a737d; } /* CommentSingle */ +.chroma .ch { color: #6a737d; } /* CommentHashbang */ +.chroma .cm { color: #999988; } /* CommentMultiline */ +.chroma .cp { color: #109295; } /* CommentPreproc */ +.chroma .cpf { color: #4c4dbc; } /* CommentPreprocFile */ +.chroma .cs { color: #999999; } /* CommentSpecial */ +.chroma .dl { color: #106303; } /* LiteralStringDelimiter */ +.chroma .gd { color: #000000; background-color: #ffdddd; } /* GenericDeleted */ +.chroma .ge { color: #000000; } /* GenericEmph */ +.chroma .gh { color: #999999; } /* GenericHeading */ +.chroma .gi { color: #000000; background-color: #ddffdd; } /* GenericInserted */ +.chroma .go { color: #888888; } /* GenericOutput */ +.chroma .gp { color: #555555; } /* GenericPrompt */ +.chroma .gr { color: #aa0000; } /* GenericError */ +.chroma .gt { color: #aa0000; } /* GenericTraceback */ +.chroma .gu { color: #aaaaaa; } /* GenericSubheading */ .chroma .hl { background-color: #e5e5e5; } /* LineHighlight */ -.chroma .lnt { color: #7f7f7f; } /* LineNumbersTable */ -.chroma .ln { color: #7f7f7f; } /* LineNumbers */ +.chroma .il { color: #009999; } /* LiteralNumberIntegerLong */ .chroma .k { color: #d73a49; } /* Keyword */ .chroma .kc { color: #d73a49; } /* KeywordConstant */ .chroma .kd { color: #d73a49; } /* KeywordDeclaration */ @@ -8,60 +25,43 @@ .chroma .kp { color: #d73a49; } /* KeywordPseudo */ .chroma .kr { color: #d73a49; } /* KeywordReserved */ .chroma .kt { color: #445588; } /* KeywordType */ +.chroma .ln { color: #7f7f7f; } /* LineNumbers */ +.chroma .lnt { color: #7f7f7f; } /* LineNumbersTable */ +.chroma .m { color: #009999; } /* LiteralNumber */ +.chroma .mb { color: #009999; } /* LiteralNumberBin */ +.chroma .mf { color: #009999; } /* LiteralNumberFloat */ +.chroma .mh { color: #009999; } /* LiteralNumberHex */ +.chroma .mi { color: #009999; } /* LiteralNumberInteger */ +.chroma .mo { color: #009999; } /* LiteralNumberOct */ .chroma .na { color: #d73a49; } /* NameAttribute */ .chroma .nb { color: #005cc5; } /* NameBuiltin */ -.chroma .bp { color: #999999; } /* NameBuiltinPseudo */ .chroma .nc { color: #445588; } /* NameClass */ -.chroma .no { color: #008080; } /* NameConstant */ .chroma .nd { color: #3c5d5d; } /* NameDecorator */ -.chroma .ni { color: #6f42c1; } /* NameEntity */ .chroma .ne { color: #990000; } /* NameException */ .chroma .nf { color: #005cc5; } /* NameFunction */ +.chroma .ni { color: #6f42c1; } /* NameEntity */ .chroma .nl { color: #990000; } /* NameLabel */ .chroma .nn { color: #555555; } /* NameNamespace */ -.chroma .nx { color: #24292e; } /* NameOther */ +.chroma .no { color: #008080; } /* NameConstant */ .chroma .nt { color: #22863a; } /* NameTag */ .chroma .nv { color: #008080; } /* NameVariable */ -.chroma .vc { color: #008080; } /* NameVariableClass */ -.chroma .vg { color: #008080; } /* NameVariableGlobal */ -.chroma .vi { color: #008080; } /* NameVariableInstance */ +.chroma .nx { color: #24292e; } /* NameOther */ +.chroma .o { color: #d73a49; } /* Operator */ +.chroma .ow { color: #d73a49; } /* OperatorWord */ .chroma .s { color: #106303; } /* LiteralString */ +.chroma .s1 { color: #cc7a00; } /* LiteralStringSingle */ +.chroma .s2 { color: #106303; } /* LiteralStringDouble */ .chroma .sa { color: #106303; } /* LiteralStringAffix */ .chroma .sb { color: #106303; } /* LiteralStringBacktick */ .chroma .sc { color: #106303; } /* LiteralStringChar */ -.chroma .dl { color: #106303; } /* LiteralStringDelimiter */ .chroma .sd { color: #106303; } /* LiteralStringDoc */ -.chroma .s2 { color: #106303; } /* LiteralStringDouble */ .chroma .se { color: #106303; } /* LiteralStringEscape */ .chroma .sh { color: #106303; } /* LiteralStringHeredoc */ .chroma .si { color: #106303; } /* LiteralStringInterpol */ -.chroma .sx { color: #106303; } /* LiteralStringOther */ .chroma .sr { color: #22863a; } /* LiteralStringRegex */ -.chroma .s1 { color: #cc7a00; } /* LiteralStringSingle */ .chroma .ss { color: #106303; } /* LiteralStringSymbol */ -.chroma .m { color: #009999; } /* LiteralNumber */ -.chroma .mb { color: #009999; } /* LiteralNumberBin */ -.chroma .mf { color: #009999; } /* LiteralNumberFloat */ -.chroma .mh { color: #009999; } /* LiteralNumberHex */ -.chroma .mi { color: #009999; } /* LiteralNumberInteger */ -.chroma .il { color: #009999; } /* LiteralNumberIntegerLong */ -.chroma .mo { color: #009999; } /* LiteralNumberOct */ -.chroma .o { color: #d73a49; } /* Operator */ -.chroma .ow { color: #d73a49; } /* OperatorWord */ -.chroma .c { color: #6a737d; } /* Comment */ -.chroma .ch { color: #6a737d; } /* CommentHashbang */ -.chroma .cm { color: #999988; } /* CommentMultiline */ -.chroma .c1 { color: #6a737d; } /* CommentSingle */ -.chroma .cs { color: #999999; } /* CommentSpecial */ -.chroma .cp { color: #109295; } /* CommentPreproc */ -.chroma .cpf { color: #4c4dbc; } /* CommentPreprocFile */ -.chroma .gd { color: #000000; background-color: #ffdddd; } /* GenericDeleted */ -.chroma .ge { color: #000000; } /* GenericEmph */ -.chroma .gr { color: #aa0000; } /* GenericError */ -.chroma .gh { color: #999999; } /* GenericHeading */ -.chroma .gi { color: #000000; background-color: #ddffdd; } /* GenericInserted */ -.chroma .go { color: #888888; } /* GenericOutput */ -.chroma .gp { color: #555555; } /* GenericPrompt */ -.chroma .gu { color: #aaaaaa; } /* GenericSubheading */ -.chroma .gt { color: #aa0000; } /* GenericTraceback */ +.chroma .sx { color: #106303; } /* LiteralStringOther */ +.chroma .vc { color: #008080; } /* NameVariableClass */ +.chroma .vg { color: #008080; } /* NameVariableGlobal */ +.chroma .vi { color: #008080; } /* NameVariableInstance */ .chroma .w { color: #bbbbbb; } /* TextWhitespace */ From 5bc73ca666588ac26cc7cea219866b79c5263527 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sat, 3 Sep 2022 18:01:00 +0200 Subject: [PATCH 11/22] Delete unreferenced packages when deleting a package version (#20977) Delete a package if its last version got deleted. Otherwise removing the owner works only after the clean up job ran. Fix #20969 --- models/packages/package.go | 11 +++++- models/packages/package_test.go | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 models/packages/package_test.go diff --git a/models/packages/package.go b/models/packages/package.go index c203901a2d4c..e39a7c4e411d 100644 --- a/models/packages/package.go +++ b/models/packages/package.go @@ -224,9 +224,16 @@ func FindUnreferencedPackages(ctx context.Context) ([]*Package, error) { Find(&ps) } -// HasOwnerPackages tests if a user/org has packages +// HasOwnerPackages tests if a user/org has accessible packages func HasOwnerPackages(ctx context.Context, ownerID int64) (bool, error) { - return db.GetEngine(ctx).Where("owner_id = ?", ownerID).Exist(&Package{}) + return db.GetEngine(ctx). + Table("package_version"). + Join("INNER", "package", "package.id = package_version.package_id"). + Where(builder.Eq{ + "package_version.is_internal": false, + "package.owner_id": ownerID, + }). + Exist(&PackageVersion{}) } // HasRepositoryPackages tests if a repository has packages diff --git a/models/packages/package_test.go b/models/packages/package_test.go new file mode 100644 index 000000000000..3d3a2333bae8 --- /dev/null +++ b/models/packages/package_test.go @@ -0,0 +1,69 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package packages_test + +import ( + "path/filepath" + "testing" + + "code.gitea.io/gitea/models/db" + packages_model "code.gitea.io/gitea/models/packages" + "code.gitea.io/gitea/models/unittest" + user_model "code.gitea.io/gitea/models/user" + + _ "code.gitea.io/gitea/models" + + "github.com/stretchr/testify/assert" +) + +func TestMain(m *testing.M) { + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + }) +} + +func TestHasOwnerPackages(t *testing.T) { + assert.NoError(t, unittest.PrepareTestDatabase()) + + owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1}) + + p, err := packages_model.TryInsertPackage(db.DefaultContext, &packages_model.Package{ + OwnerID: owner.ID, + LowerName: "package", + }) + assert.NotNil(t, p) + assert.NoError(t, err) + + // A package without package versions gets automatically cleaned up and should return false + has, err := packages_model.HasOwnerPackages(db.DefaultContext, owner.ID) + assert.False(t, has) + assert.NoError(t, err) + + pv, err := packages_model.GetOrInsertVersion(db.DefaultContext, &packages_model.PackageVersion{ + PackageID: p.ID, + LowerVersion: "internal", + IsInternal: true, + }) + assert.NotNil(t, pv) + assert.NoError(t, err) + + // A package with an internal package version gets automaticaly cleaned up and should return false + has, err = packages_model.HasOwnerPackages(db.DefaultContext, owner.ID) + assert.False(t, has) + assert.NoError(t, err) + + pv, err = packages_model.GetOrInsertVersion(db.DefaultContext, &packages_model.PackageVersion{ + PackageID: p.ID, + LowerVersion: "normal", + IsInternal: false, + }) + assert.NotNil(t, pv) + assert.NoError(t, err) + + // A package with a normal package version should return true + has, err = packages_model.HasOwnerPackages(db.DefaultContext, owner.ID) + assert.True(t, has) + assert.NoError(t, err) +} From 58a80ba69c73715dfc527ec1ee327f7c6ad4c1d6 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 3 Sep 2022 17:27:59 +0100 Subject: [PATCH 12/22] Add another index for Action table on postgres (#21033) In #21031 we have discovered that on very big tables postgres will use a search involving the sort term in preference to the restrictive index. Therefore we add another index for postgres and update the original migration. Fix #21031 Signed-off-by: Andrew Thornton --- models/activities/action.go | 9 ++++++++- models/migrations/v218.go | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/models/activities/action.go b/models/activities/action.go index 78a519e9a790..22419e20db96 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -98,7 +98,14 @@ func (a *Action) TableIndices() []*schemas.Index { actUserIndex := schemas.NewIndex("au_r_c_u_d", schemas.IndexType) actUserIndex.AddColumn("act_user_id", "repo_id", "created_unix", "user_id", "is_deleted") - return []*schemas.Index{actUserIndex, repoIndex} + indices := []*schemas.Index{actUserIndex, repoIndex} + if setting.Database.UsePostgreSQL { + cudIndex := schemas.NewIndex("c_u_d", schemas.IndexType) + cudIndex.AddColumn("created_unix", "user_id", "is_deleted") + indices = append(indices, cudIndex) + } + + return indices } // GetOpType gets the ActionType of this action. diff --git a/models/migrations/v218.go b/models/migrations/v218.go index dee8e5517e54..e08c6c5b0f5e 100644 --- a/models/migrations/v218.go +++ b/models/migrations/v218.go @@ -5,6 +5,7 @@ package migrations import ( + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "xorm.io/xorm" @@ -37,8 +38,14 @@ func (*improveActionTableIndicesAction) TableIndices() []*schemas.Index { actUserIndex := schemas.NewIndex("au_r_c_u_d", schemas.IndexType) actUserIndex.AddColumn("act_user_id", "repo_id", "created_unix", "user_id", "is_deleted") - - return []*schemas.Index{actUserIndex, repoIndex} + indices := []*schemas.Index{actUserIndex, repoIndex} + if setting.Database.UsePostgreSQL { + cudIndex := schemas.NewIndex("c_u_d", schemas.IndexType) + cudIndex.AddColumn("created_unix", "user_id", "is_deleted") + indices = append(indices, cudIndex) + } + + return indices } func improveActionTableIndices(x *xorm.Engine) error { From 82c6f7bf4afaa064035daae6094649d47cc3bc70 Mon Sep 17 00:00:00 2001 From: Cypherpunk Samurai <66906402+CypherpunkSamurai@users.noreply.github.com> Date: Sat, 3 Sep 2022 23:22:19 +0530 Subject: [PATCH 13/22] Added docs for agit-setup (#21027) This PR Adds Documentation for the new Agit feature. Agit allows creating PR directly while pushing code. Close #21018 Co-authored-by: CypherpunkSamurai Co-authored-by: delvh Co-authored-by: a1012112796 <1012112796@qq.com> --- docs/content/doc/usage/agit-support.en-us.md | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/content/doc/usage/agit-support.en-us.md diff --git a/docs/content/doc/usage/agit-support.en-us.md b/docs/content/doc/usage/agit-support.en-us.md new file mode 100644 index 000000000000..c71be6837064 --- /dev/null +++ b/docs/content/doc/usage/agit-support.en-us.md @@ -0,0 +1,47 @@ +--- +date: " 2022-09-01T20:50:42+0000" +title: "Usage: Agit Setup" +slug: "agit-setup" +weight: 12 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "Agit Setup" + weight: 12 + identifier: "agit-setup" +--- + +# Agit Setup + +In Gitea `1.13`, support for [agit](https://git-repo.info/en/2020/03/agit-flow-and-git-repo/) was added. + +## Creating PRs with Agit + +Agit allows to create PRs while pushing code to the remote repo. \ +This can be done by pushing to the branch followed by a specific refspec (a location identifier known to git). \ +The following example illustrates this: + +```shell +git push origin HEAD:refs/for/master +``` + +The command has the following structure: + +- `HEAD`: The target branch +- `refs//`: The target PR type + - `for`: Create a normal PR with `` as the target branch + - `draft`/ `for-review`: Currently ignored silently +- `/`: The target branch to open the PR +- `-o `: Options for the PR + - `title`: The PR title + - `topic`: The branch name the PR should be opened for + - `description`: The PR description + - `force-push`: confirm force update the target branch + +Here's another advanced example for creating a new PR targeting `master` with `topic`, `title`, and `description`: + +```shell +git push origin HEAD:refs/for/master -o topic="Topic of my PR" -o title="Title of the PR" -o description="# The PR Description\nThis can be **any** markdown content.\n- [x] Ok" +``` From 49efd1fb96e70a0a2517b5183d66dba301649655 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 4 Sep 2022 00:20:46 +0200 Subject: [PATCH 14/22] Add go licenses to licenses.txt (#21034) `make go-licenses` will generate `assets/go-licenses.json` which is then included in the webpack build. This step depends on both go and node being present, so unfortunately, I could not automate the generation by hooking it up to `tidy` as that target is triggered on CI where we do not have a docker image with both go an node. It should be ran from time to time, ideally after each go mod update. --- .drone.yml | 9 +- .gitignore | 1 + Makefile | 19 +- assets/go-licenses.json | 762 ++++++++++++++++++++++++++++++++++ build/generate-go-licenses.js | 30 ++ webpack.config.js | 13 +- 6 files changed, 827 insertions(+), 7 deletions(-) create mode 100644 assets/go-licenses.json create mode 100644 build/generate-go-licenses.js diff --git a/.drone.yml b/.drone.yml index 93a471fae1db..a4079e8e0968 100644 --- a/.drone.yml +++ b/.drone.yml @@ -90,7 +90,10 @@ steps: - name: checks-backend image: golang:1.19 commands: + - curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get -qqy install nodejs - make checks-backend + environment: + DEBIAN_FRONTEND: noninteractive depends_on: [deps-backend] volumes: - name: deps @@ -722,12 +725,13 @@ steps: pull: always commands: # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved - - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs + - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs - export PATH=$PATH:$GOPATH/bin - make release environment: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not TAGS: bindata sqlite sqlite_unlock_notify + DEBIAN_FRONTEND: noninteractive volumes: - name: deps path: /go @@ -842,12 +846,13 @@ steps: pull: always commands: # Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved - - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs + - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs - export PATH=$PATH:$GOPATH/bin - make release environment: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not TAGS: bindata sqlite sqlite_unlock_notify + DEBIAN_FRONTEND: noninteractive depends_on: [fetch-tags] volumes: - name: deps diff --git a/.gitignore b/.gitignore index 0407dfbbd1dc..1ce2a87611e8 100644 --- a/.gitignore +++ b/.gitignore @@ -95,6 +95,7 @@ cpu.out !/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2 /VERSION /.air +/.go-licenses # Snapcraft snap/.snapcraft/ diff --git a/Makefile b/Makefile index 96d0b992ed8a..d1bfb2645f28 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10 MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4 SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0 XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest +GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0 DOCKER_IMAGE ?= gitea/gitea DOCKER_TAG ?= latest @@ -114,13 +115,16 @@ SVG_DEST_DIR := public/img/svg AIR_TMP_DIR := .air +GO_LICENSE_TMP_DIR := .go-licenses +GO_LICENSE_FILE := assets/go-licenses.json + TAGS ?= TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS)) TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags TEST_TAGS ?= sqlite sqlite_unlock_notify -TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) +TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR) GO_DIRS := cmd tests models modules routers build services tools @@ -199,8 +203,9 @@ help: @echo " - generate-swagger generate the swagger spec from code comments" @echo " - swagger-validate check if the swagger spec is valid" @echo " - golangci-lint run golangci-lint linter" + @echo " - go-licenses regenerate go licenses" @echo " - vet examines Go source code and reports suspicious constructs" - @echo " - tidy run go mod tidy" + @echo " - tidy run go mod tidy and regenerate go licenses" @echo " - test[\#TestSpecificName] run unit test" @echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite" @echo " - pr# build and start gitea from a PR with integration test data loaded" @@ -393,6 +398,7 @@ unit-test-coverage: tidy: $(eval MIN_GO_VERSION := $(shell grep -Eo '^go\s+[0-9]+\.[0-9.]+' go.mod | cut -d' ' -f2)) $(GO) mod tidy -compat=$(MIN_GO_VERSION) + @$(MAKE) --no-print-directory assets/go-licenses.json .PHONY: vendor vendor: tidy @@ -407,6 +413,14 @@ tidy-check: tidy exit 1; \ fi +.PHONY: go-licenses +go-licenses: assets/go-licenses.json + +assets/go-licenses.json: go.mod go.sum build/generate-go-licenses.js + -$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path="$(GO_LICENSE_TMP_DIR)" 2>/dev/null + node build/generate-go-licenses.js "$(GO_LICENSE_TMP_DIR)" "$(GO_LICENSE_FILE)" + @rm -rf "$(GO_LICENSE_TMP_DIR)" + generate-ini-sqlite: sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \ -e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \ @@ -782,6 +796,7 @@ deps-backend: $(GO) install $(MISSPELL_PACKAGE) $(GO) install $(SWAGGER_PACKAGE) $(GO) install $(XGO_PACKAGE) + $(GO) install $(GO_LICENSES_PACKAGE) node_modules: package-lock.json npm install --no-save diff --git a/assets/go-licenses.json b/assets/go-licenses.json new file mode 100644 index 000000000000..8f6fba4bca7d --- /dev/null +++ b/assets/go-licenses.json @@ -0,0 +1,762 @@ +[ + { + "name": "cloud.google.com/go/compute/metadata", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "code.gitea.io/gitea", + "body": "Copyright (c) 2016 The Gitea Authors\nCopyright (c) 2015 The Gogs Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "code.gitea.io/gitea/modules/lfs", + "body": "Copyright (c) 2016 The Gitea Authors\nCopyright (c) GitHub, Inc. and LFS Test Server contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "code.gitea.io/sdk/gitea", + "body": "Copyright (c) 2016 The Gitea Authors\nCopyright (c) 2014 The Gogs Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "codeberg.org/gusted/mcaptcha", + "body": "Copyright © 2022 William Zijl\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the “Software”), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "git.sr.ht/~mariusor/go-xsd-duration", + "body": "MIT License\n\nCopyright (c) 2019 Go xsd:duration\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "gitea.com/go-chi/binding", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "gitea.com/go-chi/cache", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "gitea.com/go-chi/captcha", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "gitea.com/go-chi/session", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "gitea.com/lunny/dingtalk_webhook", + "body": "Copyright (c) 2016 The Gitea Authors\nCopyright (c) 2015 The Gogs Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "gitea.com/lunny/levelqueue", + "body": "Copyright (c) 2019 Lunny Xiao\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/42wim/sshsig", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/Azure/go-ntlmssp", + "body": "The MIT License (MIT)\n\nCopyright (c) 2016 Microsoft\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/NYTimes/gziphandler", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright 2016-2017 The New York Times Company\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/RoaringBitmap/roaring", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright 2016 by the authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n================================================================================\n\nPortions of runcontainer.go are from the Go standard library, which is licensed\nunder:\n\nCopyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/alecthomas/chroma", + "body": "Copyright (C) 2017 Alec Thomas\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/andybalholm/brotli", + "body": "Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/anmitsu/go-shlex", + "body": "Copyright (c) anmitsu \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/aymerick/douceur", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Aymerick JEHANNE\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/beorn7/perks/quantile", + "body": "Copyright (C) 2013 Blake Mizerany\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/bits-and-blooms/bitset", + "body": "Copyright (c) 2014 Will Fitzgerald. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/blevesearch/bleve/v2", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/bleve_index_api", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/go-porterstemmer", + "body": "Copyright (c) 2013 Charles Iliya Krempeaux ::\nhttp://changelog.ca/\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/blevesearch/gtreap", + "body": "Copyright (C) 2012 Steve Yen\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + "name": "github.com/blevesearch/mmap-go", + "body": "Copyright (c) 2011, Evan Shaw \nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the\nnames of its contributors may be used to endorse or promote products\nderived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n" + }, + { + "name": "github.com/blevesearch/scorch_segment_api/v2", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/segment", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/snowballstem", + "body": "Copyright (c) 2001, Dr Martin Porter\nCopyright (c) 2004,2005, Richard Boulton\nCopyright (c) 2013, Yoshiki Shibukawa\nCopyright (c) 2006,2007,2009,2010,2011,2014-2019, Olly Betts\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n3. Neither the name of the Snowball project nor the names of its contributors\nmay be used to endorse or promote products derived from this software\nwithout specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/blevesearch/upsidedown_store_api", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/vellum", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/vellum/levenshtein", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n" + }, + { + "name": "github.com/blevesearch/zapx/v11", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/zapx/v12", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/zapx/v13", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/zapx/v14", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/blevesearch/zapx/v15", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/boombuler/barcode", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Florian Sundermann\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/bradfitz/gomemcache/memcache", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/buildkite/terminal-to-html/v3", + "body": "MIT License\n\nCopyright (c) 2019 Keith Pitt, Tim Lucas, Michael Pearson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/caddyserver/certmagic", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"{}\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright {yyyy} {name of copyright owner}\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/cespare/xxhash/v2", + "body": "Copyright (c) 2016 Caleb Spare\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/chi-middleware/proxy", + "body": "Copyright (c) 2020 Lauris BH\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/cloudflare/cfssl", + "body": "Copyright (c) 2014 CloudFlare Inc.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\nRedistributions of source code must retain the above copyright notice,\nthis list of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/couchbase/go-couchbase", + "body": "Copyright (c) 2013 Couchbase, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/couchbase/gomemcached", + "body": "Copyright (c) 2013 Dustin Sallings\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/couchbase/goutils", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"{}\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright {yyyy} {name of copyright owner}\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n" + }, + { + "name": "github.com/cpuguy83/go-md2man/v2/md2man", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Brian Goff\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/denisenkom/go-mssqldb", + "body": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/dgryski/go-rendezvous", + "body": "The MIT License (MIT)\n\nCopyright (c) 2017-2020 Damian Gryski \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/djherbis/buffer", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Dustin H\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/djherbis/nio/v3", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Dustin H\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/dlclark/regexp2", + "body": "The MIT License (MIT)\n\nCopyright (c) Doug Clark\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/dsnet/compress", + "body": "Copyright © 2015, Joe Tsai and The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n* Neither the copyright holder nor the names of its contributors may be used to\nendorse or promote products derived from this software without specific prior\nwritten permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/duo-labs/webauthn", + "body": "Copyright (c) 2017 Duo Security, Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n3. Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/dustin/go-humanize", + "body": "Copyright (c) 2005-2008 Dustin Sallings \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n" + }, + { + "name": "github.com/editorconfig/editorconfig-core-go/v2", + "body": "MIT License\nCopyright (c) 2016 The Editorconfig Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/ethantkoenig/rupture", + "body": "MIT License\n\nCopyright (c) 2018 Ethan Koenig\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/felixge/fgprof", + "body": "The MIT License (MIT)\nCopyright © 2020 Felix Geisendörfer \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the “Software”), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/fsnotify/fsnotify", + "body": "Copyright (c) 2012 The Go Authors. All rights reserved.\nCopyright (c) 2012-2019 fsnotify Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/fxamacker/cbor/v2", + "body": "MIT License\n\nCopyright (c) 2019-present Faye Amacker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + }, + { + "name": "github.com/gliderlabs/ssh", + "body": "Copyright (c) 2016 Glider Labs. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Glider Labs nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/go-ap/activitypub", + "body": "MIT License\n\nCopyright (c) 2017 Golang ActitvityPub\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/go-ap/errors", + "body": "MIT License\n\nCopyright (c) 2019 Golang ActitvityPub\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/go-ap/jsonld", + "body": "MIT License\n\nCopyright (c) 2017 Marius Orcsik\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/go-asn1-ber/asn1-ber", + "body": "The MIT License (MIT)\n\nCopyright (c) 2011-2015 Michael Mitton (mmitton@gmail.com)\nPortions copyright (c) 2015-2016 go-asn1-ber Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/go-chi/chi/v5", + "body": "Copyright (c) 2015-present Peter Kieltyka (https://github.com/pkieltyka), Google\nInc.\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/go-chi/cors", + "body": "Copyright (c) 2014 Olivier Poitrey \nCopyright (c) 2016-Present https://github.com/go-chi authors\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/go-enry/go-enry/v2", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/go-fed/httpsig", + "body": "BSD 3-Clause License\n\nCopyright (c) 2018, go-fed\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/go-ldap/ldap/v3", + "body": "The MIT License (MIT)\n\nCopyright (c) 2011-2015 Michael Mitton (mmitton@gmail.com)\nPortions copyright (c) 2015-2016 go-ldap Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/go-redis/redis/v8", + "body": "Copyright (c) 2013 The github.com/go-redis/redis Authors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/go-sql-driver/mysql", + "body": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\nmeans each individual or legal entity that creates, contributes to\nthe creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\nmeans the combination of the Contributions of others (if any) used\nby a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\nmeans Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\nmeans Source Code Form to which the initial Contributor has attached\nthe notice in Exhibit A, the Executable Form of such Source Code\nForm, and Modifications of such Source Code Form, in each case\nincluding portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\nmeans\n\n(a) that the initial Contributor has attached the notice described\nin Exhibit B to the Covered Software; or\n\n(b) that the Covered Software was made available under the terms of\nversion 1.1 or earlier of the License, but not also under the\nterms of a Secondary License.\n\n1.6. \"Executable Form\"\nmeans any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\nmeans a work that combines Covered Software with other material, in\na separate file or files, that is not Covered Software.\n\n1.8. \"License\"\nmeans this document.\n\n1.9. \"Licensable\"\nmeans having the right to grant, to the maximum extent possible,\nwhether at the time of the initial grant or subsequently, any and\nall of the rights conveyed by this License.\n\n1.10. \"Modifications\"\nmeans any of the following:\n\n(a) any file in Source Code Form that results from an addition to,\ndeletion from, or modification of the contents of Covered\nSoftware; or\n\n(b) any new file in Source Code Form that contains any Covered\nSoftware.\n\n1.11. \"Patent Claims\" of a Contributor\nmeans any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the\nLicense, by the making, using, selling, offering for sale, having\nmade, import, or transfer of either its Contributions or its\nContributor Version.\n\n1.12. \"Secondary License\"\nmeans either the GNU General Public License, Version 2.0, the GNU\nLesser General Public License, Version 2.1, the GNU Affero General\nPublic License, Version 3.0, or any later versions of those\nlicenses.\n\n1.13. \"Source Code Form\"\nmeans the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, \"You\" includes any entity that\ncontrols, is controlled by, or is under common control with You. For\npurposes of this definition, \"control\" means (a) the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or (b) ownership of more than\nfifty percent (50%) of the outstanding shares or beneficial\nownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or\nas part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\nfor sale, have made, import, and otherwise transfer either its\nContributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\nor\n\n(b) for infringements caused by: (i) Your and any other third party's\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\nits Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\nForm, as described in Section 3.1, and You must inform recipients of\nthe Executable Form how they can obtain a copy of such Source Code\nForm by reasonable means in a timely manner, at a charge no more\nthan the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\nLicense, or sublicense it under different terms, provided that the\nlicense for the Executable Form does not attempt to limit or alter\nthe recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n* *\n* 6. Disclaimer of Warranty *\n* ------------------------- *\n* *\n* Covered Software is provided under this License on an \"as is\" *\n* basis, without warranty of any kind, either expressed, implied, or *\n* statutory, including, without limitation, warranties that the *\n* Covered Software is free of defects, merchantable, fit for a *\n* particular purpose or non-infringing. The entire risk as to the *\n* quality and performance of the Covered Software is with You. *\n* Should any Covered Software prove defective in any respect, You *\n* (not any Contributor) assume the cost of any necessary servicing, *\n* repair, or correction. This disclaimer of warranty constitutes an *\n* essential part of this License. No use of any Covered Software is *\n* authorized under this License except under this disclaimer. *\n* *\n************************************************************************\n\n************************************************************************\n* *\n* 7. Limitation of Liability *\n* -------------------------- *\n* *\n* Under no circumstances and under no legal theory, whether tort *\n* (including negligence), contract, or otherwise, shall any *\n* Contributor, or anyone who distributes Covered Software as *\n* permitted above, be liable to You for any direct, indirect, *\n* special, incidental, or consequential damages of any character *\n* including, without limitation, damages for lost profits, loss of *\n* goodwill, work stoppage, computer failure or malfunction, or any *\n* and all other commercial damages or losses, even if such party *\n* shall have been informed of the possibility of such damages. This *\n* limitation of liability shall not apply to liability for death or *\n* personal injury resulting from such party's negligence to the *\n* extent applicable law prohibits such limitation. Some *\n* jurisdictions do not allow the exclusion or limitation of *\n* incidental or consequential damages, so this exclusion and *\n* limitation may not apply to You. *\n* *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\nThis Source Code Form is \"Incompatible With Secondary Licenses\", as\ndefined by the Mozilla Public License, v. 2.0.\n" + }, + { + "name": "github.com/gobwas/glob", + "body": "The MIT License (MIT)\n\nCopyright (c) 2016 Sergey Kamardin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + }, + { + "name": "github.com/goccy/go-json", + "body": "MIT License\n\nCopyright (c) 2020 Masaaki Goshima\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/gogs/chardet", + "body": "Copyright (c) 2012 chardet Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nPartial of the Software is derived from ICU project. See icu-license.html for\nlicense of the derivative portions.\n" + }, + { + "name": "github.com/gogs/cron", + "body": "Copyright (C) 2012 Rob Figueiredo\nAll Rights Reserved.\n\nMIT LICENSE\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/gogs/go-gogs-client", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Go Git Service\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/golang-jwt/jwt/v4", + "body": "Copyright (c) 2012 Dave Grijalva\nCopyright (c) 2021 golang-jwt maintainers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n" + }, + { + "name": "github.com/golang-sql/civil", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/golang-sql/sqlexp", + "body": "Copyright (c) 2017 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/golang/protobuf", + "body": "Copyright 2010 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n" + }, + { + "name": "github.com/golang/snappy", + "body": "Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/google/certificate-transparency-go", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/google/go-github/v45/github", + "body": "Copyright (c) 2013 The go-github AUTHORS. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/google/go-querystring/query", + "body": "Copyright (c) 2013 Google. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/google/pprof/profile", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/google/uuid", + "body": "Copyright (c) 2009,2014 Google Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/gorilla/css/scanner", + "body": "Copyright (c) 2013, Gorilla web toolkit\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\nNeither the name of the {organization} nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/gorilla/feeds", + "body": "Copyright (c) 2013-2018 The Gorilla Feeds Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/gorilla/mux", + "body": "Copyright (c) 2012-2018 The Gorilla Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/gorilla/securecookie", + "body": "Copyright (c) 2012 Rodrigo Moraes. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/gorilla/sessions", + "body": "Copyright (c) 2012-2018 The Gorilla Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/hashicorp/go-cleanhttp", + "body": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\nmeans each individual or legal entity that creates, contributes to the\ncreation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n\nmeans the combination of the Contributions of others (if any) used by a\nContributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n\nmeans Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n\nmeans Source Code Form to which the initial Contributor has attached the\nnotice in Exhibit A, the Executable Form of such Source Code Form, and\nModifications of such Source Code Form, in each case including portions\nthereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\nmeans\n\na. that the initial Contributor has attached the notice described in\nExhibit B to the Covered Software; or\n\nb. that the Covered Software was made available under the terms of\nversion 1.1 or earlier of the License, but not also under the terms of\na Secondary License.\n\n1.6. \"Executable Form\"\n\nmeans any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n\nmeans a work that combines Covered Software with other material, in a\nseparate file or files, that is not Covered Software.\n\n1.8. \"License\"\n\nmeans this document.\n\n1.9. \"Licensable\"\n\nmeans having the right to grant, to the maximum extent possible, whether\nat the time of the initial grant or subsequently, any and all of the\nrights conveyed by this License.\n\n1.10. \"Modifications\"\n\nmeans any of the following:\n\na. any file in Source Code Form that results from an addition to,\ndeletion from, or modification of the contents of Covered Software; or\n\nb. any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor\n\nmeans any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the License,\nby the making, using, selling, offering for sale, having made, import,\nor transfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\"\n\nmeans either the GNU General Public License, Version 2.0, the GNU Lesser\nGeneral Public License, Version 2.1, the GNU Affero General Public\nLicense, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\"\n\nmeans the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, \"You\" includes any entity that controls, is\ncontrolled by, or is under common control with You. For purposes of this\ndefinition, \"control\" means (a) the power, direct or indirect, to cause\nthe direction or management of such entity, whether by contract or\notherwise, or (b) ownership of more than fifty percent (50%) of the\noutstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\na. under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or\nas part of a Larger Work; and\n\nb. under Patent Claims of such Contributor to make, use, sell, offer for\nsale, have made, import, and otherwise transfer either its\nContributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\na. for any code that a Contributor has removed from Covered Software; or\n\nb. for infringements caused by: (i) Your and any other third party's\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\nc. under Patent Claims infringed by Covered Software in the absence of\nits Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights to\ngrant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\nSection 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\na. such Covered Software must also be made available in Source Code Form,\nas described in Section 3.1, and You must inform recipients of the\nExecutable Form how they can obtain a copy of such Source Code Form by\nreasonable means in a timely manner, at a charge no more than the cost\nof distribution to the recipient; and\n\nb. You may distribute such Executable Form under the terms of this\nLicense, or sublicense it under different terms, provided that the\nlicense for the Executable Form does not attempt to limit or alter the\nrecipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty, or\nlimitations of liability) contained within the Source Code Form of the\nCovered Software, except that You may alter any license notices to the\nextent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Software due to statute,\njudicial order, or regulation then You must: (a) comply with the terms of\nthis License to the maximum extent possible; and (b) describe the\nlimitations and the code they affect. Such description must be placed in a\ntext file included with all distributions of the Covered Software under\nthis License. Except to the extent prohibited by statute or regulation,\nsuch description must be sufficiently detailed for a recipient of ordinary\nskill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\nfail to comply with any of its terms. However, if You become compliant,\nthen the rights granted under this License from a particular Contributor\nare reinstated (a) provisionally, unless and until such Contributor\nexplicitly and finally terminates Your grants, and (b) on an ongoing\nbasis, if such Contributor fails to notify You of the non-compliance by\nsome reasonable means prior to 60 days after You have come back into\ncompliance. Moreover, Your grants from a particular Contributor are\nreinstated on an ongoing basis if such Contributor notifies You of the\nnon-compliance by some reasonable means, this is the first time You have\nreceived notice of non-compliance with this License from such\nContributor, and You become compliant prior to 30 days after Your receipt\nof the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\nlicense agreements (excluding distributors and resellers) which have been\nvalidly granted by You or Your distributors under this License prior to\ntermination shall survive termination.\n\n6. Disclaimer of Warranty\n\nCovered Software is provided under this License on an \"as is\" basis,\nwithout warranty of any kind, either expressed, implied, or statutory,\nincluding, without limitation, warranties that the Covered Software is free\nof defects, merchantable, fit for a particular purpose or non-infringing.\nThe entire risk as to the quality and performance of the Covered Software\nis with You. Should any Covered Software prove defective in any respect,\nYou (not any Contributor) assume the cost of any necessary servicing,\nrepair, or correction. This disclaimer of warranty constitutes an essential\npart of this License. No use of any Covered Software is authorized under\nthis License except under this disclaimer.\n\n7. Limitation of Liability\n\nUnder no circumstances and under no legal theory, whether tort (including\nnegligence), contract, or otherwise, shall any Contributor, or anyone who\ndistributes Covered Software as permitted above, be liable to You for any\ndirect, indirect, special, incidental, or consequential damages of any\ncharacter including, without limitation, damages for lost profits, loss of\ngoodwill, work stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses, even if such party shall have been\ninformed of the possibility of such damages. This limitation of liability\nshall not apply to liability for death or personal injury resulting from\nsuch party's negligence to the extent applicable law prohibits such\nlimitation. Some jurisdictions do not allow the exclusion or limitation of\nincidental or consequential damages, so this exclusion and limitation may\nnot apply to You.\n\n8. Litigation\n\nAny litigation relating to this License may be brought only in the courts\nof a jurisdiction where the defendant maintains its principal place of\nbusiness and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions. Nothing\nin this Section shall prevent a party's ability to bring cross-claims or\ncounter-claims.\n\n9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides that\nthe language of a contract shall be construed against the drafter shall not\nbe used to construe this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses If You choose to distribute Source Code Form that is\nIncompatible With Secondary Licenses under the terms of this version of\nthe License, the notice described in Exhibit B of this License must be\nattached.\n\nExhibit A - Source Code Form License Notice\n\nThis Source Code Form is subject to the\nterms of the Mozilla Public License, v.\n2.0. If a copy of the MPL was not\ndistributed with this file, You can\nobtain one at\nhttp://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a\nnotice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\nThis Source Code Form is \"Incompatible\nWith Secondary Licenses\", as defined by\nthe Mozilla Public License, v. 2.0.\n\n" + }, + { + "name": "github.com/hashicorp/go-retryablehttp", + "body": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\nmeans each individual or legal entity that creates, contributes to the\ncreation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n\nmeans the combination of the Contributions of others (if any) used by a\nContributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n\nmeans Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n\nmeans Source Code Form to which the initial Contributor has attached the\nnotice in Exhibit A, the Executable Form of such Source Code Form, and\nModifications of such Source Code Form, in each case including portions\nthereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\nmeans\n\na. that the initial Contributor has attached the notice described in\nExhibit B to the Covered Software; or\n\nb. that the Covered Software was made available under the terms of\nversion 1.1 or earlier of the License, but not also under the terms of\na Secondary License.\n\n1.6. \"Executable Form\"\n\nmeans any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n\nmeans a work that combines Covered Software with other material, in a\nseparate file or files, that is not Covered Software.\n\n1.8. \"License\"\n\nmeans this document.\n\n1.9. \"Licensable\"\n\nmeans having the right to grant, to the maximum extent possible, whether\nat the time of the initial grant or subsequently, any and all of the\nrights conveyed by this License.\n\n1.10. \"Modifications\"\n\nmeans any of the following:\n\na. any file in Source Code Form that results from an addition to,\ndeletion from, or modification of the contents of Covered Software; or\n\nb. any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor\n\nmeans any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the License,\nby the making, using, selling, offering for sale, having made, import,\nor transfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\"\n\nmeans either the GNU General Public License, Version 2.0, the GNU Lesser\nGeneral Public License, Version 2.1, the GNU Affero General Public\nLicense, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\"\n\nmeans the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, \"You\" includes any entity that controls, is\ncontrolled by, or is under common control with You. For purposes of this\ndefinition, \"control\" means (a) the power, direct or indirect, to cause\nthe direction or management of such entity, whether by contract or\notherwise, or (b) ownership of more than fifty percent (50%) of the\noutstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\na. under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or\nas part of a Larger Work; and\n\nb. under Patent Claims of such Contributor to make, use, sell, offer for\nsale, have made, import, and otherwise transfer either its\nContributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\na. for any code that a Contributor has removed from Covered Software; or\n\nb. for infringements caused by: (i) Your and any other third party's\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\nc. under Patent Claims infringed by Covered Software in the absence of\nits Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights to\ngrant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\nSection 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\na. such Covered Software must also be made available in Source Code Form,\nas described in Section 3.1, and You must inform recipients of the\nExecutable Form how they can obtain a copy of such Source Code Form by\nreasonable means in a timely manner, at a charge no more than the cost\nof distribution to the recipient; and\n\nb. You may distribute such Executable Form under the terms of this\nLicense, or sublicense it under different terms, provided that the\nlicense for the Executable Form does not attempt to limit or alter the\nrecipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty, or\nlimitations of liability) contained within the Source Code Form of the\nCovered Software, except that You may alter any license notices to the\nextent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Software due to statute,\njudicial order, or regulation then You must: (a) comply with the terms of\nthis License to the maximum extent possible; and (b) describe the\nlimitations and the code they affect. Such description must be placed in a\ntext file included with all distributions of the Covered Software under\nthis License. Except to the extent prohibited by statute or regulation,\nsuch description must be sufficiently detailed for a recipient of ordinary\nskill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\nfail to comply with any of its terms. However, if You become compliant,\nthen the rights granted under this License from a particular Contributor\nare reinstated (a) provisionally, unless and until such Contributor\nexplicitly and finally terminates Your grants, and (b) on an ongoing\nbasis, if such Contributor fails to notify You of the non-compliance by\nsome reasonable means prior to 60 days after You have come back into\ncompliance. Moreover, Your grants from a particular Contributor are\nreinstated on an ongoing basis if such Contributor notifies You of the\nnon-compliance by some reasonable means, this is the first time You have\nreceived notice of non-compliance with this License from such\nContributor, and You become compliant prior to 30 days after Your receipt\nof the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\nlicense agreements (excluding distributors and resellers) which have been\nvalidly granted by You or Your distributors under this License prior to\ntermination shall survive termination.\n\n6. Disclaimer of Warranty\n\nCovered Software is provided under this License on an \"as is\" basis,\nwithout warranty of any kind, either expressed, implied, or statutory,\nincluding, without limitation, warranties that the Covered Software is free\nof defects, merchantable, fit for a particular purpose or non-infringing.\nThe entire risk as to the quality and performance of the Covered Software\nis with You. Should any Covered Software prove defective in any respect,\nYou (not any Contributor) assume the cost of any necessary servicing,\nrepair, or correction. This disclaimer of warranty constitutes an essential\npart of this License. No use of any Covered Software is authorized under\nthis License except under this disclaimer.\n\n7. Limitation of Liability\n\nUnder no circumstances and under no legal theory, whether tort (including\nnegligence), contract, or otherwise, shall any Contributor, or anyone who\ndistributes Covered Software as permitted above, be liable to You for any\ndirect, indirect, special, incidental, or consequential damages of any\ncharacter including, without limitation, damages for lost profits, loss of\ngoodwill, work stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses, even if such party shall have been\ninformed of the possibility of such damages. This limitation of liability\nshall not apply to liability for death or personal injury resulting from\nsuch party's negligence to the extent applicable law prohibits such\nlimitation. Some jurisdictions do not allow the exclusion or limitation of\nincidental or consequential damages, so this exclusion and limitation may\nnot apply to You.\n\n8. Litigation\n\nAny litigation relating to this License may be brought only in the courts\nof a jurisdiction where the defendant maintains its principal place of\nbusiness and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions. Nothing\nin this Section shall prevent a party's ability to bring cross-claims or\ncounter-claims.\n\n9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides that\nthe language of a contract shall be construed against the drafter shall not\nbe used to construe this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses If You choose to distribute Source Code Form that is\nIncompatible With Secondary Licenses under the terms of this version of\nthe License, the notice described in Exhibit B of this License must be\nattached.\n\nExhibit A - Source Code Form License Notice\n\nThis Source Code Form is subject to the\nterms of the Mozilla Public License, v.\n2.0. If a copy of the MPL was not\ndistributed with this file, You can\nobtain one at\nhttp://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a\nnotice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\nThis Source Code Form is \"Incompatible\nWith Secondary Licenses\", as defined by\nthe Mozilla Public License, v. 2.0.\n\n" + }, + { + "name": "github.com/hashicorp/go-version", + "body": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. “Contributor”\n\nmeans each individual or legal entity that creates, contributes to the\ncreation of, or owns Covered Software.\n\n1.2. “Contributor Version”\n\nmeans the combination of the Contributions of others (if any) used by a\nContributor and that particular Contributor’s Contribution.\n\n1.3. “Contribution”\n\nmeans Covered Software of a particular Contributor.\n\n1.4. “Covered Software”\n\nmeans Source Code Form to which the initial Contributor has attached the\nnotice in Exhibit A, the Executable Form of such Source Code Form, and\nModifications of such Source Code Form, in each case including portions\nthereof.\n\n1.5. “Incompatible With Secondary Licenses”\nmeans\n\na. that the initial Contributor has attached the notice described in\nExhibit B to the Covered Software; or\n\nb. that the Covered Software was made available under the terms of version\n1.1 or earlier of the License, but not also under the terms of a\nSecondary License.\n\n1.6. “Executable Form”\n\nmeans any form of the work other than Source Code Form.\n\n1.7. “Larger Work”\n\nmeans a work that combines Covered Software with other material, in a separate\nfile or files, that is not Covered Software.\n\n1.8. “License”\n\nmeans this document.\n\n1.9. “Licensable”\n\nmeans having the right to grant, to the maximum extent possible, whether at the\ntime of the initial grant or subsequently, any and all of the rights conveyed by\nthis License.\n\n1.10. “Modifications”\n\nmeans any of the following:\n\na. any file in Source Code Form that results from an addition to, deletion\nfrom, or modification of the contents of Covered Software; or\n\nb. any new file in Source Code Form that contains any Covered Software.\n\n1.11. “Patent Claims” of a Contributor\n\nmeans any patent claim(s), including without limitation, method, process,\nand apparatus claims, in any patent Licensable by such Contributor that\nwould be infringed, but for the grant of the License, by the making,\nusing, selling, offering for sale, having made, import, or transfer of\neither its Contributions or its Contributor Version.\n\n1.12. “Secondary License”\n\nmeans either the GNU General Public License, Version 2.0, the GNU Lesser\nGeneral Public License, Version 2.1, the GNU Affero General Public\nLicense, Version 3.0, or any later versions of those licenses.\n\n1.13. “Source Code Form”\n\nmeans the form of the work preferred for making modifications.\n\n1.14. “You” (or “Your”)\n\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, “You” includes any entity that controls, is\ncontrolled by, or is under common control with You. For purposes of this\ndefinition, “control” means (a) the power, direct or indirect, to cause\nthe direction or management of such entity, whether by contract or\notherwise, or (b) ownership of more than fifty percent (50%) of the\noutstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\na. under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or as\npart of a Larger Work; and\n\nb. under Patent Claims of such Contributor to make, use, sell, offer for\nsale, have made, import, and otherwise transfer either its Contributions\nor its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution become\neffective for each Contribution on the date the Contributor first distributes\nsuch Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under this\nLicense. No additional rights or licenses will be implied from the distribution\nor licensing of Covered Software under this License. Notwithstanding Section\n2.1(b) above, no patent license is granted by a Contributor:\n\na. for any code that a Contributor has removed from Covered Software; or\n\nb. for infringements caused by: (i) Your and any other third party’s\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\nc. under Patent Claims infringed by Covered Software in the absence of its\nContributions.\n\nThis License does not grant any rights in the trademarks, service marks, or\nlogos of any Contributor (except as may be necessary to comply with the\nnotice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this License\n(see Section 10.2) or under the terms of a Secondary License (if permitted\nunder the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its Contributions\nare its original creation(s) or it has sufficient rights to grant the\nrights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under applicable\ncopyright doctrines of fair use, fair dealing, or other equivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\nSection 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under the\nterms of this License. You must inform recipients that the Source Code Form\nof the Covered Software is governed by the terms of this License, and how\nthey can obtain a copy of this License. You may not attempt to alter or\nrestrict the recipients’ rights in the Source Code Form.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\na. such Covered Software must also be made available in Source Code Form,\nas described in Section 3.1, and You must inform recipients of the\nExecutable Form how they can obtain a copy of such Source Code Form by\nreasonable means in a timely manner, at a charge no more than the cost\nof distribution to the recipient; and\n\nb. You may distribute such Executable Form under the terms of this License,\nor sublicense it under different terms, provided that the license for\nthe Executable Form does not attempt to limit or alter the recipients’\nrights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for the\nCovered Software. If the Larger Work is a combination of Covered Software\nwith a work governed by one or more Secondary Licenses, and the Covered\nSoftware is not Incompatible With Secondary Licenses, this License permits\nYou to additionally distribute such Covered Software under the terms of\nsuch Secondary License(s), so that the recipient of the Larger Work may, at\ntheir option, further distribute the Covered Software under the terms of\neither this License or such Secondary License(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices (including\ncopyright notices, patent notices, disclaimers of warranty, or limitations\nof liability) contained within the Source Code Form of the Covered\nSoftware, except that You may alter any license notices to the extent\nrequired to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on behalf\nof any Contributor. You must make it absolutely clear that any such\nwarranty, support, indemnity, or liability obligation is offered by You\nalone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Software due to statute, judicial\norder, or regulation then You must: (a) comply with the terms of this License\nto the maximum extent possible; and (b) describe the limitations and the code\nthey affect. Such description must be placed in a text file included with all\ndistributions of the Covered Software under this License. Except to the\nextent prohibited by statute or regulation, such description must be\nsufficiently detailed for a recipient of ordinary skill to be able to\nunderstand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\nfail to comply with any of its terms. However, if You become compliant,\nthen the rights granted under this License from a particular Contributor\nare reinstated (a) provisionally, unless and until such Contributor\nexplicitly and finally terminates Your grants, and (b) on an ongoing basis,\nif such Contributor fails to notify You of the non-compliance by some\nreasonable means prior to 60 days after You have come back into compliance.\nMoreover, Your grants from a particular Contributor are reinstated on an\nongoing basis if such Contributor notifies You of the non-compliance by\nsome reasonable means, this is the first time You have received notice of\nnon-compliance with this License from such Contributor, and You become\ncompliant prior to 30 days after Your receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions, counter-claims,\nand cross-claims) alleging that a Contributor Version directly or\nindirectly infringes any patent, then the rights granted to You by any and\nall Contributors for the Covered Software under Section 2.1 of this License\nshall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\nlicense agreements (excluding distributors and resellers) which have been\nvalidly granted by You or Your distributors under this License prior to\ntermination shall survive termination.\n\n6. Disclaimer of Warranty\n\nCovered Software is provided under this License on an “as is” basis, without\nwarranty of any kind, either expressed, implied, or statutory, including,\nwithout limitation, warranties that the Covered Software is free of defects,\nmerchantable, fit for a particular purpose or non-infringing. The entire\nrisk as to the quality and performance of the Covered Software is with You.\nShould any Covered Software prove defective in any respect, You (not any\nContributor) assume the cost of any necessary servicing, repair, or\ncorrection. This disclaimer of warranty constitutes an essential part of this\nLicense. No use of any Covered Software is authorized under this License\nexcept under this disclaimer.\n\n7. Limitation of Liability\n\nUnder no circumstances and under no legal theory, whether tort (including\nnegligence), contract, or otherwise, shall any Contributor, or anyone who\ndistributes Covered Software as permitted above, be liable to You for any\ndirect, indirect, special, incidental, or consequential damages of any\ncharacter including, without limitation, damages for lost profits, loss of\ngoodwill, work stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses, even if such party shall have been\ninformed of the possibility of such damages. This limitation of liability\nshall not apply to liability for death or personal injury resulting from such\nparty’s negligence to the extent applicable law prohibits such limitation.\nSome jurisdictions do not allow the exclusion or limitation of incidental or\nconsequential damages, so this exclusion and limitation may not apply to You.\n\n8. Litigation\n\nAny litigation relating to this License may be brought only in the courts of\na jurisdiction where the defendant maintains its principal place of business\nand such litigation shall be governed by laws of that jurisdiction, without\nreference to its conflict-of-law provisions. Nothing in this Section shall\nprevent a party’s ability to bring cross-claims or counter-claims.\n\n9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject matter\nhereof. If any provision of this License is held to be unenforceable, such\nprovision shall be reformed only to the extent necessary to make it\nenforceable. Any law or regulation which provides that the language of a\ncontract shall be construed against the drafter shall not be used to construe\nthis License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version of\nthe License under which You originally received the Covered Software, or\nunder the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a modified\nversion of this License if you rename the license and remove any\nreferences to the name of the license steward (except to note that such\nmodified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n\nThis Source Code Form is subject to the\nterms of the Mozilla Public License, v.\n2.0. If a copy of the MPL was not\ndistributed with this file, You can\nobtain one at\nhttp://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file, then\nYou may include the notice in a location (such as a LICENSE file in a relevant\ndirectory) where a recipient would be likely to look for such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - “Incompatible With Secondary Licenses” Notice\n\nThis Source Code Form is “Incompatible\nWith Secondary Licenses”, as defined by\nthe Mozilla Public License, v. 2.0.\n\n" + }, + { + "name": "github.com/hashicorp/golang-lru", + "body": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\nmeans each individual or legal entity that creates, contributes to the\ncreation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n\nmeans the combination of the Contributions of others (if any) used by a\nContributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n\nmeans Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n\nmeans Source Code Form to which the initial Contributor has attached the\nnotice in Exhibit A, the Executable Form of such Source Code Form, and\nModifications of such Source Code Form, in each case including portions\nthereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\nmeans\n\na. that the initial Contributor has attached the notice described in\nExhibit B to the Covered Software; or\n\nb. that the Covered Software was made available under the terms of\nversion 1.1 or earlier of the License, but not also under the terms of\na Secondary License.\n\n1.6. \"Executable Form\"\n\nmeans any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n\nmeans a work that combines Covered Software with other material, in a\nseparate file or files, that is not Covered Software.\n\n1.8. \"License\"\n\nmeans this document.\n\n1.9. \"Licensable\"\n\nmeans having the right to grant, to the maximum extent possible, whether\nat the time of the initial grant or subsequently, any and all of the\nrights conveyed by this License.\n\n1.10. \"Modifications\"\n\nmeans any of the following:\n\na. any file in Source Code Form that results from an addition to,\ndeletion from, or modification of the contents of Covered Software; or\n\nb. any new file in Source Code Form that contains any Covered Software.\n\n1.11. \"Patent Claims\" of a Contributor\n\nmeans any patent claim(s), including without limitation, method,\nprocess, and apparatus claims, in any patent Licensable by such\nContributor that would be infringed, but for the grant of the License,\nby the making, using, selling, offering for sale, having made, import,\nor transfer of either its Contributions or its Contributor Version.\n\n1.12. \"Secondary License\"\n\nmeans either the GNU General Public License, Version 2.0, the GNU Lesser\nGeneral Public License, Version 2.1, the GNU Affero General Public\nLicense, Version 3.0, or any later versions of those licenses.\n\n1.13. \"Source Code Form\"\n\nmeans the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n\nmeans an individual or a legal entity exercising rights under this\nLicense. For legal entities, \"You\" includes any entity that controls, is\ncontrolled by, or is under common control with You. For purposes of this\ndefinition, \"control\" means (a) the power, direct or indirect, to cause\nthe direction or management of such entity, whether by contract or\notherwise, or (b) ownership of more than fifty percent (50%) of the\noutstanding shares or beneficial ownership of such entity.\n\n\n2. License Grants and Conditions\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\na. under intellectual property rights (other than patent or trademark)\nLicensable by such Contributor to use, reproduce, make available,\nmodify, display, perform, distribute, and otherwise exploit its\nContributions, either on an unmodified basis, with Modifications, or\nas part of a Larger Work; and\n\nb. under Patent Claims of such Contributor to make, use, sell, offer for\nsale, have made, import, and otherwise transfer either its\nContributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\na. for any code that a Contributor has removed from Covered Software; or\n\nb. for infringements caused by: (i) Your and any other third party's\nmodifications of Covered Software, or (ii) the combination of its\nContributions with other software (except as part of its Contributor\nVersion); or\n\nc. under Patent Claims infringed by Covered Software in the absence of\nits Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights to\ngrant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in\nSection 2.1.\n\n\n3. Responsibilities\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\na. such Covered Software must also be made available in Source Code Form,\nas described in Section 3.1, and You must inform recipients of the\nExecutable Form how they can obtain a copy of such Source Code Form by\nreasonable means in a timely manner, at a charge no more than the cost\nof distribution to the recipient; and\n\nb. You may distribute such Executable Form under the terms of this\nLicense, or sublicense it under different terms, provided that the\nlicense for the Executable Form does not attempt to limit or alter the\nrecipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty, or\nlimitations of liability) contained within the Source Code Form of the\nCovered Software, except that You may alter any license notices to the\nextent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n\nIf it is impossible for You to comply with any of the terms of this License\nwith respect to some or all of the Covered Software due to statute,\njudicial order, or regulation then You must: (a) comply with the terms of\nthis License to the maximum extent possible; and (b) describe the\nlimitations and the code they affect. Such description must be placed in a\ntext file included with all distributions of the Covered Software under\nthis License. Except to the extent prohibited by statute or regulation,\nsuch description must be sufficiently detailed for a recipient of ordinary\nskill to be able to understand it.\n\n5. Termination\n\n5.1. The rights granted under this License will terminate automatically if You\nfail to comply with any of its terms. However, if You become compliant,\nthen the rights granted under this License from a particular Contributor\nare reinstated (a) provisionally, unless and until such Contributor\nexplicitly and finally terminates Your grants, and (b) on an ongoing\nbasis, if such Contributor fails to notify You of the non-compliance by\nsome reasonable means prior to 60 days after You have come back into\ncompliance. Moreover, Your grants from a particular Contributor are\nreinstated on an ongoing basis if such Contributor notifies You of the\nnon-compliance by some reasonable means, this is the first time You have\nreceived notice of non-compliance with this License from such\nContributor, and You become compliant prior to 30 days after Your receipt\nof the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user\nlicense agreements (excluding distributors and resellers) which have been\nvalidly granted by You or Your distributors under this License prior to\ntermination shall survive termination.\n\n6. Disclaimer of Warranty\n\nCovered Software is provided under this License on an \"as is\" basis,\nwithout warranty of any kind, either expressed, implied, or statutory,\nincluding, without limitation, warranties that the Covered Software is free\nof defects, merchantable, fit for a particular purpose or non-infringing.\nThe entire risk as to the quality and performance of the Covered Software\nis with You. Should any Covered Software prove defective in any respect,\nYou (not any Contributor) assume the cost of any necessary servicing,\nrepair, or correction. This disclaimer of warranty constitutes an essential\npart of this License. No use of any Covered Software is authorized under\nthis License except under this disclaimer.\n\n7. Limitation of Liability\n\nUnder no circumstances and under no legal theory, whether tort (including\nnegligence), contract, or otherwise, shall any Contributor, or anyone who\ndistributes Covered Software as permitted above, be liable to You for any\ndirect, indirect, special, incidental, or consequential damages of any\ncharacter including, without limitation, damages for lost profits, loss of\ngoodwill, work stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses, even if such party shall have been\ninformed of the possibility of such damages. This limitation of liability\nshall not apply to liability for death or personal injury resulting from\nsuch party's negligence to the extent applicable law prohibits such\nlimitation. Some jurisdictions do not allow the exclusion or limitation of\nincidental or consequential damages, so this exclusion and limitation may\nnot apply to You.\n\n8. Litigation\n\nAny litigation relating to this License may be brought only in the courts\nof a jurisdiction where the defendant maintains its principal place of\nbusiness and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions. Nothing\nin this Section shall prevent a party's ability to bring cross-claims or\ncounter-claims.\n\n9. Miscellaneous\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides that\nthe language of a contract shall be construed against the drafter shall not\nbe used to construe this License against a Contributor.\n\n\n10. Versions of the License\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses If You choose to distribute Source Code Form that is\nIncompatible With Secondary Licenses under the terms of this version of\nthe License, the notice described in Exhibit B of this License must be\nattached.\n\nExhibit A - Source Code Form License Notice\n\nThis Source Code Form is subject to the\nterms of the Mozilla Public License, v.\n2.0. If a copy of the MPL was not\ndistributed with this file, You can\nobtain one at\nhttp://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular file,\nthen You may include the notice in a location (such as a LICENSE file in a\nrelevant directory) where a recipient would be likely to look for such a\nnotice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n\nThis Source Code Form is \"Incompatible\nWith Secondary Licenses\", as defined by\nthe Mozilla Public License, v. 2.0.\n" + }, + { + "name": "github.com/huandu/xstrings", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Huan Du\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/jaytaylor/html2text", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Jay Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/josharian/intern", + "body": "MIT License\n\nCopyright (c) 2019 Josh Bleecher Snyder\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/json-iterator/go", + "body": "MIT License\n\nCopyright (c) 2016 json-iterator\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/kballard/go-shellquote", + "body": "Copyright (C) 2014 Kevin Ballard\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/keybase/go-crypto", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/klauspost/compress", + "body": "Copyright (c) 2012 The Go Authors. All rights reserved.\nCopyright (c) 2019 Klaus Post. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n------------------\n\nFiles: gzhttp/*\n\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright 2016-2017 The New York Times Company\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n------------------\n\nFiles: s2/cmd/internal/readahead/*\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Klaus Post\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n---------------------\nFiles: snappy/*\nFiles: internal/snapref/*\n\nCopyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n-----------------\n\nFiles: s2/cmd/internal/filepathx/*\n\nCopyright 2016 The filepathx Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/klauspost/compress/internal/snapref", + "body": "Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/klauspost/compress/s2", + "body": "Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.\nCopyright (c) 2019 Klaus Post. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/klauspost/compress/zstd/internal/xxhash", + "body": "Copyright (c) 2016 Caleb Spare\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/klauspost/cpuid/v2", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 Klaus Post\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/klauspost/pgzip", + "body": "MIT License\n\nCopyright (c) 2014 Klaus Post\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/lib/pq", + "body": "Copyright (c) 2011-2013, 'pq' Contributors\nPortions Copyright (C) 2011 Blake Mizerany\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/libdns/libdns", + "body": "MIT License\n\nCopyright (c) 2020 Matthew Holt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/mailru/easyjson", + "body": "Copyright (c) 2016 Mail.Ru Group\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/markbates/going/defaults", + "body": "Copyright (c) 2014 Mark Bates\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/markbates/goth", + "body": "Copyright (c) 2014 Mark Bates\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/mattn/go-isatty", + "body": "Copyright (c) Yasuhiro MATSUMOTO \n\nMIT License (Expat)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/mattn/go-runewidth", + "body": "The MIT License (MIT)\n\nCopyright (c) 2016 Yasuhiro Matsumoto\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/matttproud/golang_protobuf_extensions/pbutil", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"{}\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright {yyyy} {name of copyright owner}\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/matttproud/golang_protobuf_extensions/pbutil", + "body": "Copyright 2012 Matt T. Proud (matt.proud@gmail.com)\n" + }, + { + "name": "github.com/mholt/acmez", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/mholt/archiver/v3", + "body": "MIT License\n\nCopyright (c) 2016 Matthew Holt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + }, + { + "name": "github.com/microcosm-cc/bluemonday", + "body": "SPDX short identifier: BSD-3-Clause\nhttps://opensource.org/licenses/BSD-3-Clause\n\nCopyright (c) 2014, David Kitchen \n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* Neither the name of the organisation (Microcosm) nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/miekg/dns", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nAs this is fork of the official Go code the same license applies.\nExtensions of the original work are copyright (c) 2011 Miek Gieben\n" + }, + { + "name": "github.com/minio/md5-simd", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/minio/minio-go/v7", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/minio/minio-go/v7", + "body": "MinIO Cloud Storage, (C) 2014-2020 MinIO, Inc.\n\nThis product includes software developed at MinIO, Inc.\n(https://min.io/).\n\nThe MinIO project contains unmodified/modified subcomponents too with\nseparate copyright notices and license terms. Your use of the source\ncode for these subcomponents is subject to the terms and conditions\nof Apache License Version 2.0\n" + }, + { + "name": "github.com/minio/sha256-simd", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/mitchellh/mapstructure", + "body": "The MIT License (MIT)\n\nCopyright (c) 2013 Mitchell Hashimoto\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/modern-go/concurrent", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/modern-go/reflect2", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/nfnt/resize", + "body": "Copyright (c) 2012, Jan Schlicht \n\nPermission to use, copy, modify, and/or distribute this software for any purpose\nwith or without fee is hereby granted, provided that the above copyright notice\nand this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\nOF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\nTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\nTHIS SOFTWARE.\n" + }, + { + "name": "github.com/niklasfasching/go-org/org", + "body": "MIT License\n\nCopyright (c) 2018 Niklas Fasching\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/nwaples/rardecode", + "body": "Copyright (c) 2015, Nicholas Waples\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/olekukonko/tablewriter", + "body": "Copyright (C) 2014 by Oleku Konko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/oliamb/cutter", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Olivier Amblet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/olivere/elastic/v7", + "body": "The MIT License (MIT)\nCopyright © 2012-2015 Oliver Eilhard\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n" + }, + { + "name": "github.com/olivere/elastic/v7/uritemplates", + "body": "Copyright (c) 2013 Joshua Tacoma\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/pierrec/lz4/v4", + "body": "Copyright (c) 2015, Pierre Curto\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* Neither the name of xxHash nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n" + }, + { + "name": "github.com/pkg/errors", + "body": "Copyright (c) 2015, Dave Cheney \nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/pquerna/otp", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/pquerna/otp", + "body": "otp\nCopyright (c) 2014, Paul Querna\n\nThis product includes software developed by\nPaul Querna (http://paul.querna.org/).\n" + }, + { + "name": "github.com/prometheus/client_golang/prometheus", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/prometheus/client_golang/prometheus", + "body": "Prometheus instrumentation library for Go applications\nCopyright 2012-2015 The Prometheus Authors\n\nThis product includes software developed at\nSoundCloud Ltd. (http://soundcloud.com/).\n\n\nThe following components are included in this product:\n\nperks - a fork of https://github.com/bmizerany/perks\nhttps://github.com/beorn7/perks\nCopyright 2013-2015 Blake Mizerany, Björn Rabenstein\nSee https://github.com/beorn7/perks/blob/master/README.md for license details.\n\nGo support for Protocol Buffers - Google's data interchange format\nhttp://github.com/golang/protobuf/\nCopyright 2010 The Go Authors\nSee source code for license details.\n\nSupport for streaming Protocol Buffer messages for the Go language (golang).\nhttps://github.com/matttproud/golang_protobuf_extensions\nCopyright 2013 Matt T. Proud\nLicensed under the Apache License, Version 2.0\n" + }, + { + "name": "github.com/prometheus/client_model/go", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/prometheus/client_model/go", + "body": "Data model artifacts for Prometheus.\nCopyright 2012-2015 The Prometheus Authors\n\nThis product includes software developed at\nSoundCloud Ltd. (http://soundcloud.com/).\n" + }, + { + "name": "github.com/prometheus/common", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/prometheus/common", + "body": "Common libraries shared by Prometheus Go components.\nCopyright 2015 The Prometheus Authors\n\nThis product includes software developed at\nSoundCloud Ltd. (http://soundcloud.com/).\n" + }, + { + "name": "github.com/prometheus/procfs", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"[]\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/prometheus/procfs", + "body": "procfs provides functions to retrieve system, kernel and process\nmetrics from the pseudo-filesystem proc.\n\nCopyright 2014-2015 The Prometheus Authors\n\nThis product includes software developed at\nSoundCloud Ltd. (http://soundcloud.com/).\n" + }, + { + "name": "github.com/rivo/uniseg", + "body": "MIT License\n\nCopyright (c) 2019 Oliver Kuederle\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/rs/xid", + "body": "Copyright (c) 2015 Olivier Poitrey \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/russross/blackfriday/v2", + "body": "Blackfriday is distributed under the Simplified BSD License:\n\n> Copyright © 2011 Russ Ross\n> All rights reserved.\n>\n> Redistribution and use in source and binary forms, with or without\n> modification, are permitted provided that the following conditions\n> are met:\n>\n> 1. Redistributions of source code must retain the above copyright\n> notice, this list of conditions and the following disclaimer.\n>\n> 2. Redistributions in binary form must reproduce the above\n> copyright notice, this list of conditions and the following\n> disclaimer in the documentation and/or other materials provided with\n> the distribution.\n>\n> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n> \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n> POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/santhosh-tekuri/jsonschema/v5", + "body": "\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability." + }, + { + "name": "github.com/sergi/go-diff/diffmatchpatch", + "body": "Copyright (c) 2012-2016 The go-diff Authors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\n" + }, + { + "name": "github.com/ssor/bom", + "body": "MIT License\n\nCopyright (c) 2017 Asher\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/syndtr/goleveldb/leveldb", + "body": "Copyright 2012 Suryandaru Triandana \nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/tstranex/u2f", + "body": "The MIT License (MIT)\n\nCopyright (c) 2015 The Go FIDO U2F Library Authors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "github.com/ulikunitz/xz", + "body": "Copyright (c) 2014-2021 Ulrich Kunitz\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* My name, Ulrich Kunitz, may not be used to endorse or promote products\nderived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "github.com/unknwon/com", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." + }, + { + "name": "github.com/unrolled/render", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Cory Jacobsen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "github.com/urfave/cli", + "body": "MIT License\n\nCopyright (c) 2016 Jeremy Saenz & Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/valyala/fastjson", + "body": "The MIT License (MIT)\n\nCopyright (c) 2018 Aliaksandr Valialkin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/x448/float16", + "body": "MIT License\n\nCopyright (c) 2019 Montgomery Edwards⁴⁴⁸ and Faye Amacker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" + }, + { + "name": "github.com/xanzy/go-gitlab", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"{}\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright {yyyy} {name of copyright owner}\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/yohcop/openid-go", + "body": "Copyright 2015 Yohann Coppel\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "github.com/yuin/goldmark-highlighting", + "body": "MIT License\n\nCopyright (c) 2019 Yusuke Inuzuka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/yuin/goldmark-meta", + "body": "MIT License\n\nCopyright (c) 2019 Yusuke Inuzuka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "github.com/yuin/goldmark", + "body": "MIT License\n\nCopyright (c) 2019 Yusuke Inuzuka\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" + }, + { + "name": "go.etcd.io/bbolt", + "body": "The MIT License (MIT)\n\nCopyright (c) 2013 Ben Johnson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "go.jolheiser.com/hcaptcha", + "body": "Copyright 2020 John Olheiser\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + "name": "go.jolheiser.com/pwn", + "body": "Copyright 2020 John Olheiser\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + "name": "go.uber.org/atomic", + "body": "Copyright (c) 2016 Uber Technologies, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "go.uber.org/multierr", + "body": "Copyright (c) 2017-2021 Uber Technologies, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "go.uber.org/zap", + "body": "Copyright (c) 2016-2017 Uber Technologies, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "golang.org/x/crypto", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/mod/semver", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/net", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/oauth2", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/sys", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/text", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "golang.org/x/time/rate", + "body": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "google.golang.org/protobuf", + "body": "Copyright (c) 2018 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "gopkg.in/gomail.v2", + "body": "The MIT License (MIT)\n\nCopyright (c) 2014 Alexandre Cesaro\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" + }, + { + "name": "gopkg.in/ini.v1", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction, and\ndistribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by the copyright\nowner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all other entities\nthat control, are controlled by, or are under common control with that entity.\nFor the purposes of this definition, \"control\" means (i) the power, direct or\nindirect, to cause the direction or management of such entity, whether by\ncontract or otherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising\npermissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications, including\nbut not limited to software source code, documentation source, and configuration\nfiles.\n\n\"Object\" form shall mean any form resulting from mechanical transformation or\ntranslation of a Source form, including but not limited to compiled object code,\ngenerated documentation, and conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or Object form, made\navailable under the License, as indicated by a copyright notice that is included\nin or attached to the work (an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object form, that\nis based on (or derived from) the Work and for which the editorial revisions,\nannotations, elaborations, or other modifications represent, as a whole, an\noriginal work of authorship. For the purposes of this License, Derivative Works\nshall not include works that remain separable from, or merely link (or bind by\nname) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including the original version\nof the Work and any modifications or additions to that Work or Derivative Works\nthereof, that is intentionally submitted to Licensor for inclusion in the Work\nby the copyright owner or by an individual or Legal Entity authorized to submit\non behalf of the copyright owner. For the purposes of this definition,\n\"submitted\" means any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems, and\nissue tracking systems that are managed by, or on behalf of, the Licensor for\nthe purpose of discussing and improving the Work, but excluding communication\nthat is conspicuously marked or otherwise designated in writing by the copyright\nowner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf\nof whom a Contribution has been received by Licensor and subsequently\nincorporated within the Work.\n\n2. Grant of Copyright License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable copyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the Work and such\nDerivative Works in Source or Object form.\n\n3. Grant of Patent License.\n\nSubject to the terms and conditions of this License, each Contributor hereby\ngrants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,\nirrevocable (except as stated in this section) patent license to make, have\nmade, use, offer to sell, sell, import, and otherwise transfer the Work, where\nsuch license applies only to those patent claims licensable by such Contributor\nthat are necessarily infringed by their Contribution(s) alone or by combination\nof their Contribution(s) with the Work to which such Contribution(s) was\nsubmitted. If You institute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work or a\nContribution incorporated within the Work constitutes direct or contributory\npatent infringement, then any patent licenses granted to You under this License\nfor that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution.\n\nYou may reproduce and distribute copies of the Work or Derivative Works thereof\nin any medium, with or without modifications, and in Source or Object form,\nprovided that You meet the following conditions:\n\nYou must give any other recipients of the Work or Derivative Works a copy of\nthis License; and\nYou must cause any modified files to carry prominent notices stating that You\nchanged the files; and\nYou must retain, in the Source form of any Derivative Works that You distribute,\nall copyright, patent, trademark, and attribution notices from the Source form\nof the Work, excluding those notices that do not pertain to any part of the\nDerivative Works; and\nIf the Work includes a \"NOTICE\" text file as part of its distribution, then any\nDerivative Works that You distribute must include a readable copy of the\nattribution notices contained within such NOTICE file, excluding those notices\nthat do not pertain to any part of the Derivative Works, in at least one of the\nfollowing places: within a NOTICE text file distributed as part of the\nDerivative Works; within the Source form or documentation, if provided along\nwith the Derivative Works; or, within a display generated by the Derivative\nWorks, if and wherever such third-party notices normally appear. The contents of\nthe NOTICE file are for informational purposes only and do not modify the\nLicense. You may add Your own attribution notices within Derivative Works that\nYou distribute, alongside or as an addendum to the NOTICE text from the Work,\nprovided that such additional attribution notices cannot be construed as\nmodifying the License.\nYou may add Your own copyright statement to Your modifications and may provide\nadditional or different license terms and conditions for use, reproduction, or\ndistribution of Your modifications, or for any such Derivative Works as a whole,\nprovided Your use, reproduction, and distribution of the Work otherwise complies\nwith the conditions stated in this License.\n\n5. Submission of Contributions.\n\nUnless You explicitly state otherwise, any Contribution intentionally submitted\nfor inclusion in the Work by You to the Licensor shall be under the terms and\nconditions of this License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify the terms of\nany separate license agreement you may have executed with Licensor regarding\nsuch Contributions.\n\n6. Trademarks.\n\nThis License does not grant permission to use the trade names, trademarks,\nservice marks, or product names of the Licensor, except as required for\nreasonable and customary use in describing the origin of the Work and\nreproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty.\n\nUnless required by applicable law or agreed to in writing, Licensor provides the\nWork (and each Contributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,\nincluding, without limitation, any warranties or conditions of TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are\nsolely responsible for determining the appropriateness of using or\nredistributing the Work and assume any risks associated with Your exercise of\npermissions under this License.\n\n8. Limitation of Liability.\n\nIn no event and under no legal theory, whether in tort (including negligence),\ncontract, or otherwise, unless required by applicable law (such as deliberate\nand grossly negligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special, incidental,\nor consequential damages of any character arising as a result of this License or\nout of the use or inability to use the Work (including but not limited to\ndamages for loss of goodwill, work stoppage, computer failure or malfunction, or\nany and all other commercial damages or losses), even if such Contributor has\nbeen advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability.\n\nWhile redistributing the Work or Derivative Works thereof, You may choose to\noffer, and charge a fee for, acceptance of support, warranty, indemnity, or\nother liability obligations and/or rights consistent with this License. However,\nin accepting such obligations, You may act only on Your own behalf and on Your\nsole responsibility, not on behalf of any other Contributor, and only if You\nagree to indemnify, defend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason of your\naccepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work\n\nTo apply the Apache License to your work, attach the following boilerplate\nnotice, with the fields enclosed by brackets \"[]\" replaced with your own\nidentifying information. (Don't include the brackets!) The text should be\nenclosed in the appropriate comment syntax for the file format. We also\nrecommend that a file or class name and description of purpose be included on\nthe same \"printed page\" as the copyright notice for easier identification within\nthird-party archives.\n\nCopyright 2014 Unknwon\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "gopkg.in/yaml.v2", + "body": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\" shall mean the terms and conditions for use, reproduction,\nand distribution as defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the copyright owner or entity authorized by\nthe copyright owner that is granting the License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all\nother entities that control, are controlled by, or are under common\ncontrol with that entity. For the purposes of this definition,\n\"control\" means (i) the power, direct or indirect, to cause the\ndirection or management of such entity, whether by contract or\notherwise, or (ii) ownership of fifty percent (50%) or more of the\noutstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\" (or \"Your\") shall mean an individual or Legal Entity\nexercising permissions granted by this License.\n\n\"Source\" form shall mean the preferred form for making modifications,\nincluding but not limited to software source code, documentation\nsource, and configuration files.\n\n\"Object\" form shall mean any form resulting from mechanical\ntransformation or translation of a Source form, including but\nnot limited to compiled object code, generated documentation,\nand conversions to other media types.\n\n\"Work\" shall mean the work of authorship, whether in Source or\nObject form, made available under the License, as indicated by a\ncopyright notice that is included in or attached to the work\n(an example is provided in the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source or Object\nform, that is based on (or derived from) the Work and for which the\neditorial revisions, annotations, elaborations, or other modifications\nrepresent, as a whole, an original work of authorship. For the purposes\nof this License, Derivative Works shall not include works that remain\nseparable from, or merely link (or bind by name) to the interfaces of,\nthe Work and Derivative Works thereof.\n\n\"Contribution\" shall mean any work of authorship, including\nthe original version of the Work and any modifications or additions\nto that Work or Derivative Works thereof, that is intentionally\nsubmitted to Licensor for inclusion in the Work by the copyright owner\nor by an individual or Legal Entity authorized to submit on behalf of\nthe copyright owner. For the purposes of this definition, \"submitted\"\nmeans any form of electronic, verbal, or written communication sent\nto the Licensor or its representatives, including but not limited to\ncommunication on electronic mailing lists, source code control systems,\nand issue tracking systems that are managed by, or on behalf of, the\nLicensor for the purpose of discussing and improving the Work, but\nexcluding communication that is conspicuously marked or otherwise\ndesignated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\" shall mean Licensor and any individual or Legal Entity\non behalf of whom a Contribution has been received by Licensor and\nsubsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\ncopyright license to reproduce, prepare Derivative Works of,\npublicly display, publicly perform, sublicense, and distribute the\nWork and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\nthis License, each Contributor hereby grants to You a perpetual,\nworldwide, non-exclusive, no-charge, royalty-free, irrevocable\n(except as stated in this section) patent license to make, have made,\nuse, offer to sell, sell, import, and otherwise transfer the Work,\nwhere such license applies only to those patent claims licensable\nby such Contributor that are necessarily infringed by their\nContribution(s) alone or by combination of their Contribution(s)\nwith the Work to which such Contribution(s) was submitted. If You\ninstitute patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Work\nor a Contribution incorporated within the Work constitutes direct\nor contributory patent infringement, then any patent licenses\ngranted to You under this License for that Work shall terminate\nas of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\nWork or Derivative Works thereof in any medium, with or without\nmodifications, and in Source or Object form, provided that You\nmeet the following conditions:\n\n(a) You must give any other recipients of the Work or\nDerivative Works a copy of this License; and\n\n(b) You must cause any modified files to carry prominent notices\nstating that You changed the files; and\n\n(c) You must retain, in the Source form of any Derivative Works\nthat You distribute, all copyright, patent, trademark, and\nattribution notices from the Source form of the Work,\nexcluding those notices that do not pertain to any part of\nthe Derivative Works; and\n\n(d) If the Work includes a \"NOTICE\" text file as part of its\ndistribution, then any Derivative Works that You distribute must\ninclude a readable copy of the attribution notices contained\nwithin such NOTICE file, excluding those notices that do not\npertain to any part of the Derivative Works, in at least one\nof the following places: within a NOTICE text file distributed\nas part of the Derivative Works; within the Source form or\ndocumentation, if provided along with the Derivative Works; or,\nwithin a display generated by the Derivative Works, if and\nwherever such third-party notices normally appear. The contents\nof the NOTICE file are for informational purposes only and\ndo not modify the License. You may add Your own attribution\nnotices within Derivative Works that You distribute, alongside\nor as an addendum to the NOTICE text from the Work, provided\nthat such additional attribution notices cannot be construed\nas modifying the License.\n\nYou may add Your own copyright statement to Your modifications and\nmay provide additional or different license terms and conditions\nfor use, reproduction, or distribution of Your modifications, or\nfor any such Derivative Works as a whole, provided Your use,\nreproduction, and distribution of the Work otherwise complies with\nthe conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\nany Contribution intentionally submitted for inclusion in the Work\nby You to the Licensor shall be under the terms and conditions of\nthis License, without any additional terms or conditions.\nNotwithstanding the above, nothing herein shall supersede or modify\nthe terms of any separate license agreement you may have executed\nwith Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\nnames, trademarks, service marks, or product names of the Licensor,\nexcept as required for reasonable and customary use in describing the\norigin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\nagreed to in writing, Licensor provides the Work (and each\nContributor provides its Contributions) on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied, including, without limitation, any warranties or conditions\nof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\nPARTICULAR PURPOSE. You are solely responsible for determining the\nappropriateness of using or redistributing the Work and assume any\nrisks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\nwhether in tort (including negligence), contract, or otherwise,\nunless required by applicable law (such as deliberate and grossly\nnegligent acts) or agreed to in writing, shall any Contributor be\nliable to You for damages, including any direct, indirect, special,\nincidental, or consequential damages of any character arising as a\nresult of this License or out of the use or inability to use the\nWork (including but not limited to damages for loss of goodwill,\nwork stoppage, computer failure or malfunction, or any and all\nother commercial damages or losses), even if such Contributor\nhas been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\nthe Work or Derivative Works thereof, You may choose to offer,\nand charge a fee for, acceptance of support, warranty, indemnity,\nor other liability obligations and/or rights consistent with this\nLicense. However, in accepting such obligations, You may act only\non Your own behalf and on Your sole responsibility, not on behalf\nof any other Contributor, and only if You agree to indemnify,\ndefend, and hold each Contributor harmless for any liability\nincurred by, or claims asserted against, such Contributor by reason\nof your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\nTo apply the Apache License to your work, attach the following\nboilerplate notice, with the fields enclosed by brackets \"{}\"\nreplaced with your own identifying information. (Don't include\nthe brackets!) The text should be enclosed in the appropriate\ncomment syntax for the file format. We also recommend that a\nfile or class name and description of purpose be included on the\nsame \"printed page\" as the copyright notice for easier\nidentification within third-party archives.\n\nCopyright {yyyy} {name of copyright owner}\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "gopkg.in/yaml.v2", + "body": "Copyright 2011-2016 Canonical Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + }, + { + "name": "mvdan.cc/xurls/v2", + "body": "Copyright (c) 2015, Daniel Martí. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "strk.kbt.io/projects/go/libravatar", + "body": "Copyright (c) 2016 Sandro Santilli \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n" + }, + { + "name": "xorm.io/builder", + "body": "Copyright (c) 2016 The Xorm Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* Neither the name of the {organization} nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + }, + { + "name": "xorm.io/xorm", + "body": "Copyright (c) 2013 - 2015 The Xorm Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n\n* Neither the name of the {organization} nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" + } +] \ No newline at end of file diff --git a/build/generate-go-licenses.js b/build/generate-go-licenses.js new file mode 100644 index 000000000000..a645e594bafc --- /dev/null +++ b/build/generate-go-licenses.js @@ -0,0 +1,30 @@ +#!/usr/bin/env node +import fastGlob from 'fast-glob'; +import {fileURLToPath} from 'url'; +import {readFileSync, writeFileSync} from 'fs'; +import wrapAnsi from 'wrap-ansi'; +import {join, dirname} from 'path'; + +const base = process.argv[2]; +const out = process.argv[3]; + +function exit(err) { + if (err) console.error(err); + process.exit(err ? 1 : 0); +} + +async function main() { + const data = fastGlob.sync('**/*', { + cwd: fileURLToPath(new URL(`../${base}`, import.meta.url)), + }).filter((path) => { + return /\/((UN)?LICEN(S|C)E|COPYING|NOTICE)/i.test(path); + }).sort().map((path) => { + return { + name: dirname(path), + body: wrapAnsi(readFileSync(join(base, path), 'utf8') || '', 80) + }; + }); + writeFileSync(out, JSON.stringify(data, null, 2)); +} + +main().then(exit).catch(exit); diff --git a/webpack.config.js b/webpack.config.js index 9252a5a31f00..904687098bbf 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,6 +9,7 @@ import EsBuildLoader from 'esbuild-loader'; import {parse, dirname} from 'path'; import webpack from 'webpack'; import {fileURLToPath} from 'url'; +import {readFileSync} from 'fs'; const {VueLoaderPlugin} = VueLoader; const {ESBuildMinifyPlugin} = EsBuildLoader; @@ -205,10 +206,16 @@ export default { outputFilename: 'js/licenses.txt', outputWriter: ({dependencies}) => { const line = '-'.repeat(80); - return dependencies.map((module) => { - const {name, version, licenseName, licenseText} = module; + const goModules = JSON.parse(readFileSync('assets/go-licenses.json', 'utf8')); + const jsModules = dependencies.map(({name, version, licenseName, licenseText}) => { const body = wrapAnsi(licenseText || '', 80); - return `${line}\n${name}@${version} - ${licenseName}\n${line}\n${body}`; + return {name, version, licenseName, body}; + }); + + const modules = [...goModules, ...jsModules].sort((a, b) => a.name.localeCompare(b.name)); + return modules.map(({name, version, licenseName, body}) => { + const title = licenseName ? `${name}@${version} - ${licenseName}` : name; + return `${line}\n${title}\n${line}\n${body}`; }).join('\n'); }, override: { From 0887459ac68a7d3605ba0f4a51df97b76e7cae9e Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 4 Sep 2022 00:20:43 +0000 Subject: [PATCH 15/22] [skip ci] Updated licenses and gitignores --- options/license/Fair | 2 -- options/license/Python-2.0.1 | 14 -------------- options/license/Spencer-86 | 2 -- options/license/gnu-javamail-exception | 2 +- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/options/license/Fair b/options/license/Fair index 32b6d6aff4d2..430fdb05f96f 100644 --- a/options/license/Fair +++ b/options/license/Fair @@ -5,5 +5,3 @@ Fair License Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. - -[2004, Fair License: rhid.com/fair (this URL no longer works)] diff --git a/options/license/Python-2.0.1 b/options/license/Python-2.0.1 index 2b90e0400c36..22f32578d401 100644 --- a/options/license/Python-2.0.1 +++ b/options/license/Python-2.0.1 @@ -191,17 +191,3 @@ FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION ----------------------------------------------------------------------- - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/Spencer-86 b/options/license/Spencer-86 index 8577e881c12d..ace415744d90 100644 --- a/options/license/Spencer-86 +++ b/options/license/Spencer-86 @@ -7,5 +7,3 @@ Permission is granted to anyone to use this software for any purpose on any comp 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. - -Beware that some of this code is subtly aware of the way operator precedence is structured in regular expressions. Serious changes in regular-expression syntax might require a total rethink. diff --git a/options/license/gnu-javamail-exception b/options/license/gnu-javamail-exception index 6b24ec821a2d..8f3b9ab0d08a 100644 --- a/options/license/gnu-javamail-exception +++ b/options/license/gnu-javamail-exception @@ -1 +1 @@ -As a special exception, if you link this library with other files to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License." +As a special exception, if you link this library with other files to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. From 93a610a819688b54d4565b8cbbae7cc04c552073 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Sun, 4 Sep 2022 17:18:07 +0800 Subject: [PATCH 16/22] Fill the specified ref in webhook test payload (#20961) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The webhook payload should use the right ref when it‘s specified in the testing request. The compare URL should not be empty, a URL like `compare/A...A` seems useless in most cases but is helpful when testing. --- routers/api/v1/repo/hook.go | 16 ++++++++++++---- routers/web/repo/webhook.go | 6 ++++-- templates/swagger/v1_json.tmpl | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 8a546e581ad5..b17142c0f647 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" @@ -140,7 +141,7 @@ func TestHook(ctx *context.APIContext) { // required: true // - name: ref // in: query - // description: "The name of the commit/branch/tag. Default the repository’s default branch (usually master)" + // description: "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload." // type: string // required: false // responses: @@ -153,6 +154,11 @@ func TestHook(ctx *context.APIContext) { return } + ref := git.BranchPrefix + ctx.Repo.Repository.DefaultBranch + if r := ctx.FormTrim("ref"); r != "" { + ref = r + } + hookID := ctx.ParamsInt64(":id") hook, err := utils.GetRepoHook(ctx, ctx.Repo.Repository.ID, hookID) if err != nil { @@ -161,10 +167,12 @@ func TestHook(ctx *context.APIContext) { commit := convert.ToPayloadCommit(ctx.Repo.Repository, ctx.Repo.Commit) + commitID := ctx.Repo.Commit.ID.String() if err := webhook_service.PrepareWebhook(hook, ctx.Repo.Repository, webhook.HookEventPush, &api.PushPayload{ - Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, - Before: ctx.Repo.Commit.ID.String(), - After: ctx.Repo.Commit.ID.String(), + Ref: ref, + Before: commitID, + After: commitID, + CompareURL: setting.AppURL + ctx.Repo.Repository.ComposeCompareURL(commitID, commitID), Commits: []*api.PayloadCommit{commit}, HeadCommit: commit, Repo: convert.ToRepo(ctx.Repo.Repository, perm.AccessModeNone), diff --git a/routers/web/repo/webhook.go b/routers/web/repo/webhook.go index a5270a7761d1..7e659de0da75 100644 --- a/routers/web/repo/webhook.go +++ b/routers/web/repo/webhook.go @@ -665,10 +665,12 @@ func TestWebhook(ctx *context.Context) { }, } + commitID := commit.ID.String() p := &api.PushPayload{ Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, - Before: commit.ID.String(), - After: commit.ID.String(), + Before: commitID, + After: commitID, + CompareURL: setting.AppURL + ctx.Repo.Repository.ComposeCompareURL(commitID, commitID), Commits: []*api.PayloadCommit{apiCommit}, HeadCommit: apiCommit, Repo: convert.ToRepo(ctx.Repo.Repository, perm.AccessModeNone), diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 63b124bd9e76..15f71c244a0e 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4666,7 +4666,7 @@ }, { "type": "string", - "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "description": "The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.", "name": "ref", "in": "query" } From e6b3be460840f1f982d5358198466e7d6f509d21 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 4 Sep 2022 11:47:56 +0100 Subject: [PATCH 17/22] Add more checks in migration code (#21011) When migrating add several more important sanity checks: * SHAs must be SHAs * Refs must be valid Refs * URLs must be reasonable Signed-off-by: Andrew Thornton Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- models/activities/action.go | 2 +- modules/git/ref.go | 28 +- modules/git/repo_commit_nogogit.go | 2 +- modules/git/sha1.go | 7 +- modules/migration/pullrequest.go | 9 +- modules/migration/release.go | 9 +- modules/migration/repo.go | 2 +- modules/validation/binding.go | 34 +-- routers/api/v1/repo/commits.go | 3 +- routers/api/v1/repo/notes.go | 3 +- services/migrations/codebase.go | 22 +- services/migrations/common.go | 82 ++++++ services/migrations/dump.go | 288 +++++++++++++-------- services/migrations/gitbucket.go | 17 ++ services/migrations/gitea_downloader.go | 43 +-- services/migrations/gitea_uploader.go | 261 +++++++++++++------ services/migrations/gitea_uploader_test.go | 7 +- services/migrations/github.go | 76 ++++-- services/migrations/gitlab.go | 24 ++ services/migrations/gogs.go | 14 + services/migrations/migrate.go | 16 +- services/migrations/onedev.go | 17 ++ services/migrations/restore.go | 1 + services/release/release.go | 7 +- 24 files changed, 693 insertions(+), 281 deletions(-) create mode 100644 services/migrations/common.go diff --git a/models/activities/action.go b/models/activities/action.go index 22419e20db96..31ecdedd5b87 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -267,7 +267,7 @@ func (a *Action) GetRefLink() string { return a.GetRepoLink() + "/src/branch/" + util.PathEscapeSegments(strings.TrimPrefix(a.RefName, git.BranchPrefix)) case strings.HasPrefix(a.RefName, git.TagPrefix): return a.GetRepoLink() + "/src/tag/" + util.PathEscapeSegments(strings.TrimPrefix(a.RefName, git.TagPrefix)) - case len(a.RefName) == 40 && git.SHAPattern.MatchString(a.RefName): + case len(a.RefName) == 40 && git.IsValidSHAPattern(a.RefName): return a.GetRepoLink() + "/src/commit/" + a.RefName default: // FIXME: we will just assume it's a branch - this was the old way - at some point we may want to enforce that there is always a ref here. diff --git a/modules/git/ref.go b/modules/git/ref.go index 9fd071ce58da..2f459148a22d 100644 --- a/modules/git/ref.go +++ b/modules/git/ref.go @@ -4,7 +4,10 @@ package git -import "strings" +import ( + "regexp" + "strings" +) const ( // RemotePrefix is the base directory of the remotes information of git. @@ -15,6 +18,29 @@ const ( pullLen = len(PullPrefix) ) +// refNamePatternInvalid is regular expression with unallowed characters in git reference name +// They cannot have ASCII control characters (i.e. bytes whose values are lower than \040, or \177 DEL), space, tilde ~, caret ^, or colon : anywhere. +// They cannot have question-mark ?, asterisk *, or open bracket [ anywhere +var refNamePatternInvalid = regexp.MustCompile( + `[\000-\037\177 \\~^:?*[]|` + // No absolutely invalid characters + `(?:^[/.])|` + // Not HasPrefix("/") or "." + `(?:/\.)|` + // no "/." + `(?:\.lock$)|(?:\.lock/)|` + // No ".lock/"" or ".lock" at the end + `(?:\.\.)|` + // no ".." anywhere + `(?://)|` + // no "//" anywhere + `(?:@{)|` + // no "@{" + `(?:[/.]$)|` + // no terminal '/' or '.' + `(?:^@$)`) // Not "@" + +// IsValidRefPattern ensures that the provided string could be a valid reference +func IsValidRefPattern(name string) bool { + return !refNamePatternInvalid.MatchString(name) +} + +func SanitizeRefPattern(name string) string { + return refNamePatternInvalid.ReplaceAllString(name, "_") +} + // Reference represents a Git ref. type Reference struct { Name string diff --git a/modules/git/repo_commit_nogogit.go b/modules/git/repo_commit_nogogit.go index e528af0ffb88..efea307b37a2 100644 --- a/modules/git/repo_commit_nogogit.go +++ b/modules/git/repo_commit_nogogit.go @@ -138,7 +138,7 @@ func (repo *Repository) getCommitFromBatchReader(rd *bufio.Reader, id SHA1) (*Co // ConvertToSHA1 returns a Hash object from a potential ID string func (repo *Repository) ConvertToSHA1(commitID string) (SHA1, error) { - if len(commitID) == 40 && SHAPattern.MatchString(commitID) { + if len(commitID) == 40 && IsValidSHAPattern(commitID) { sha1, err := NewIDFromString(commitID) if err == nil { return sha1, nil diff --git a/modules/git/sha1.go b/modules/git/sha1.go index 2da74733df72..15f282c6e4af 100644 --- a/modules/git/sha1.go +++ b/modules/git/sha1.go @@ -19,7 +19,12 @@ const EmptySHA = "0000000000000000000000000000000000000000" const EmptyTreeSHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904" // SHAPattern can be used to determine if a string is an valid sha -var SHAPattern = regexp.MustCompile(`^[0-9a-f]{4,40}$`) +var shaPattern = regexp.MustCompile(`^[0-9a-f]{4,40}$`) + +// IsValidSHAPattern will check if the provided string matches the SHA Pattern +func IsValidSHAPattern(sha string) bool { + return shaPattern.MatchString(sha) +} // MustID always creates a new SHA1 from a [20]byte array with no validation of input. func MustID(b []byte) SHA1 { diff --git a/modules/migration/pullrequest.go b/modules/migration/pullrequest.go index eaa0dd45e2c4..dd520cd63f97 100644 --- a/modules/migration/pullrequest.go +++ b/modules/migration/pullrequest.go @@ -26,7 +26,7 @@ type PullRequest struct { Updated time.Time Closed *time.Time Labels []*Label - PatchURL string `yaml:"patch_url"` + PatchURL string `yaml:"patch_url"` // SECURITY: This must be safe to download directly from Merged bool MergedTime *time.Time `yaml:"merged_time"` MergeCommitSHA string `yaml:"merge_commit_sha"` @@ -37,6 +37,7 @@ type PullRequest struct { Reactions []*Reaction ForeignIndex int64 Context DownloaderContext `yaml:"-"` + EnsuredSafe bool `yaml:"ensured_safe"` } func (p *PullRequest) GetLocalIndex() int64 { return p.Number } @@ -55,9 +56,9 @@ func (p PullRequest) GetGitRefName() string { // PullRequestBranch represents a pull request branch type PullRequestBranch struct { - CloneURL string `yaml:"clone_url"` - Ref string - SHA string + CloneURL string `yaml:"clone_url"` // SECURITY: This must be safe to download from + Ref string // SECURITY: this must be a git.IsValidRefPattern + SHA string // SECURITY: this must be a git.IsValidSHAPattern RepoName string `yaml:"repo_name"` OwnerName string `yaml:"owner_name"` } diff --git a/modules/migration/release.go b/modules/migration/release.go index cbdf01a3ed1d..923b3817b038 100644 --- a/modules/migration/release.go +++ b/modules/migration/release.go @@ -18,15 +18,16 @@ type ReleaseAsset struct { DownloadCount *int `yaml:"download_count"` Created time.Time Updated time.Time - DownloadURL *string `yaml:"download_url"` + + DownloadURL *string `yaml:"download_url"` // SECURITY: It is the responsibility of downloader to make sure this is safe // if DownloadURL is nil, the function should be invoked - DownloadFunc func() (io.ReadCloser, error) `yaml:"-"` + DownloadFunc func() (io.ReadCloser, error) `yaml:"-"` // SECURITY: It is the responsibility of downloader to make sure this is safe } // Release represents a release type Release struct { - TagName string `yaml:"tag_name"` - TargetCommitish string `yaml:"target_commitish"` + TagName string `yaml:"tag_name"` // SECURITY: This must pass git.IsValidRefPattern + TargetCommitish string `yaml:"target_commitish"` // SECURITY: This must pass git.IsValidRefPattern Name string Body string Draft bool diff --git a/modules/migration/repo.go b/modules/migration/repo.go index d0d62de8da9c..75622595d969 100644 --- a/modules/migration/repo.go +++ b/modules/migration/repo.go @@ -12,7 +12,7 @@ type Repository struct { IsPrivate bool `yaml:"is_private"` IsMirror bool `yaml:"is_mirror"` Description string - CloneURL string `yaml:"clone_url"` + CloneURL string `yaml:"clone_url"` // SECURITY: This must be checked to ensure that is safe to be used OriginalURL string `yaml:"original_url"` DefaultBranch string } diff --git a/modules/validation/binding.go b/modules/validation/binding.go index 7baa36ccc51a..f08f63242664 100644 --- a/modules/validation/binding.go +++ b/modules/validation/binding.go @@ -9,6 +9,8 @@ import ( "regexp" "strings" + "code.gitea.io/gitea/modules/git" + "gitea.com/go-chi/binding" "github.com/gobwas/glob" ) @@ -24,30 +26,6 @@ const ( ErrRegexPattern = "RegexPattern" ) -// GitRefNamePatternInvalid is regular expression with unallowed characters in git reference name -// They cannot have ASCII control characters (i.e. bytes whose values are lower than \040, or \177 DEL), space, tilde ~, caret ^, or colon : anywhere. -// They cannot have question-mark ?, asterisk *, or open bracket [ anywhere -var GitRefNamePatternInvalid = regexp.MustCompile(`[\000-\037\177 \\~^:?*[]+`) - -// CheckGitRefAdditionalRulesValid check name is valid on additional rules -func CheckGitRefAdditionalRulesValid(name string) bool { - // Additional rules as described at https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html - if strings.HasPrefix(name, "/") || strings.HasSuffix(name, "/") || - strings.HasSuffix(name, ".") || strings.Contains(name, "..") || - strings.Contains(name, "//") || strings.Contains(name, "@{") || - name == "@" { - return false - } - parts := strings.Split(name, "/") - for _, part := range parts { - if strings.HasSuffix(part, ".lock") || strings.HasPrefix(part, ".") { - return false - } - } - - return true -} - // AddBindingRules adds additional binding rules func AddBindingRules() { addGitRefNameBindingRule() @@ -67,16 +45,10 @@ func addGitRefNameBindingRule() { IsValid: func(errs binding.Errors, name string, val interface{}) (bool, binding.Errors) { str := fmt.Sprintf("%v", val) - if GitRefNamePatternInvalid.MatchString(str) { + if !git.IsValidRefPattern(str) { errs.Add([]string{name}, ErrGitRefName, "GitRefName") return false, errs } - - if !CheckGitRefAdditionalRulesValid(str) { - errs.Add([]string{name}, ErrGitRefName, "GitRefName") - return false, errs - } - return true, errs }, }) diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go index b196ce97740d..12c329c2030b 100644 --- a/routers/api/v1/repo/commits.go +++ b/routers/api/v1/repo/commits.go @@ -17,7 +17,6 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/validation" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -53,7 +52,7 @@ func GetSingleCommit(ctx *context.APIContext) { // "$ref": "#/responses/notFound" sha := ctx.Params(":sha") - if (validation.GitRefNamePatternInvalid.MatchString(sha) || !validation.CheckGitRefAdditionalRulesValid(sha)) && !git.SHAPattern.MatchString(sha) { + if !git.IsValidRefPattern(sha) { ctx.Error(http.StatusUnprocessableEntity, "no valid ref or sha", fmt.Sprintf("no valid ref or sha: %s", sha)) return } diff --git a/routers/api/v1/repo/notes.go b/routers/api/v1/repo/notes.go index bd8e27e40bf4..67f097a424ac 100644 --- a/routers/api/v1/repo/notes.go +++ b/routers/api/v1/repo/notes.go @@ -12,7 +12,6 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/validation" ) // GetNote Get a note corresponding to a single commit from a repository @@ -47,7 +46,7 @@ func GetNote(ctx *context.APIContext) { // "$ref": "#/responses/notFound" sha := ctx.Params(":sha") - if (validation.GitRefNamePatternInvalid.MatchString(sha) || !validation.CheckGitRefAdditionalRulesValid(sha)) && !git.SHAPattern.MatchString(sha) { + if !git.IsValidRefPattern(sha) { ctx.Error(http.StatusUnprocessableEntity, "no valid ref or sha", fmt.Sprintf("no valid ref or sha: %s", sha)) return } diff --git a/services/migrations/codebase.go b/services/migrations/codebase.go index bb74c0a49d1d..edeb27677345 100644 --- a/services/migrations/codebase.go +++ b/services/migrations/codebase.go @@ -107,9 +107,24 @@ func NewCodebaseDownloader(ctx context.Context, projectURL *url.URL, project, re commitMap: make(map[string]string), } + log.Trace("Create Codebase downloader. BaseURL: %s Project: %s RepoName: %s", baseURL, project, repoName) return downloader } +// String implements Stringer +func (d *CodebaseDownloader) String() string { + return fmt.Sprintf("migration from codebase server %s %s/%s", d.baseURL, d.project, d.repoName) +} + +// ColorFormat provides a basic color format for a GogsDownloader +func (d *CodebaseDownloader) ColorFormat(s fmt.State) { + if d == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from codebase server %s %s/%s", d.baseURL, d.project, d.repoName) +} + // FormatCloneURL add authentication into remote URLs func (d *CodebaseDownloader) FormatCloneURL(opts base.MigrateOptions, remoteAddr string) (string, error) { return opts.CloneAddr, nil @@ -451,8 +466,8 @@ func (d *CodebaseDownloader) GetPullRequests(page, perPage int) ([]*base.PullReq Value int64 `xml:",chardata"` Type string `xml:"type,attr"` } `xml:"id"` - SourceRef string `xml:"source-ref"` - TargetRef string `xml:"target-ref"` + SourceRef string `xml:"source-ref"` // NOTE: from the documentation these are actually just branches NOT full refs + TargetRef string `xml:"target-ref"` // NOTE: from the documentation these are actually just branches NOT full refs Subject string `xml:"subject"` Status string `xml:"status"` UserID struct { @@ -564,6 +579,9 @@ func (d *CodebaseDownloader) GetPullRequests(page, perPage int) ([]*base.PullReq Comments: comments[1:], }, }) + + // SECURITY: Ensure that the PR is safe + _ = CheckAndEnsureSafePR(pullRequests[len(pullRequests)-1], d.baseURL.String(), d) } return pullRequests, true, nil diff --git a/services/migrations/common.go b/services/migrations/common.go new file mode 100644 index 000000000000..305ae89b2de5 --- /dev/null +++ b/services/migrations/common.go @@ -0,0 +1,82 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + "strings" + + admin_model "code.gitea.io/gitea/models/admin" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + base "code.gitea.io/gitea/modules/migration" +) + +// WarnAndNotice will log the provided message and send a repository notice +func WarnAndNotice(fmtStr string, args ...interface{}) { + log.Warn(fmtStr, args...) + if err := admin_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil { + log.Error("create repository notice failed: ", err) + } +} + +func hasBaseURL(toCheck, baseURL string) bool { + if len(baseURL) > 0 && baseURL[len(baseURL)-1] != '/' { + baseURL += "/" + } + return strings.HasPrefix(toCheck, baseURL) +} + +// CheckAndEnsureSafePR will check that a given PR is safe to download +func CheckAndEnsureSafePR(pr *base.PullRequest, commonCloneBaseURL string, g base.Downloader) bool { + valid := true + // SECURITY: the patchURL must be checked to have the same baseURL as the current to prevent open redirect + if pr.PatchURL != "" && !hasBaseURL(pr.PatchURL, commonCloneBaseURL) { + // TODO: Should we check that this url has the expected format for a patch url? + WarnAndNotice("PR #%d in %s has invalid PatchURL: %s baseURL: %s", pr.Number, g, pr.PatchURL, commonCloneBaseURL) + pr.PatchURL = "" + valid = false + } + + // SECURITY: the headCloneURL must be checked to have the same baseURL as the current to prevent open redirect + if pr.Head.CloneURL != "" && !hasBaseURL(pr.Head.CloneURL, commonCloneBaseURL) { + // TODO: Should we check that this url has the expected format for a patch url? + WarnAndNotice("PR #%d in %s has invalid HeadCloneURL: %s baseURL: %s", pr.Number, g, pr.Head.CloneURL, commonCloneBaseURL) + pr.Head.CloneURL = "" + valid = false + } + + // SECURITY: SHAs Must be a SHA + if pr.MergeCommitSHA != "" && !git.IsValidSHAPattern(pr.MergeCommitSHA) { + WarnAndNotice("PR #%d in %s has invalid MergeCommitSHA: %s", pr.Number, g, pr.MergeCommitSHA) + pr.MergeCommitSHA = "" + } + if pr.Head.SHA != "" && !git.IsValidSHAPattern(pr.Head.SHA) { + WarnAndNotice("PR #%d in %s has invalid HeadSHA: %s", pr.Number, g, pr.Head.SHA) + pr.Head.SHA = "" + valid = false + } + if pr.Base.SHA != "" && !git.IsValidSHAPattern(pr.Base.SHA) { + WarnAndNotice("PR #%d in %s has invalid BaseSHA: %s", pr.Number, g, pr.Base.SHA) + pr.Base.SHA = "" + valid = false + } + + // SECURITY: Refs must be valid refs or SHAs + if pr.Head.Ref != "" && !git.IsValidRefPattern(pr.Head.Ref) { + WarnAndNotice("PR #%d in %s has invalid HeadRef: %s", pr.Number, g, pr.Head.Ref) + pr.Head.Ref = "" + valid = false + } + if pr.Base.Ref != "" && !git.IsValidRefPattern(pr.Base.Ref) { + WarnAndNotice("PR #%d in %s has invalid BaseRef: %s", pr.Number, g, pr.Base.Ref) + pr.Base.Ref = "" + valid = false + } + + pr.EnsuredSafe = true + + return valid +} diff --git a/services/migrations/dump.go b/services/migrations/dump.go index f040c6c6630f..2dc35b9d9fbe 100644 --- a/services/migrations/dump.go +++ b/services/migrations/dump.go @@ -12,7 +12,6 @@ import ( "net/http" "net/url" "os" - "path" "path/filepath" "strconv" "strings" @@ -26,6 +25,8 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" + "github.com/google/uuid" + "gopkg.in/yaml.v2" ) @@ -47,7 +48,7 @@ type RepositoryDumper struct { reviewFiles map[int64]*os.File gitRepo *git.Repository - prHeadCache map[string]struct{} + prHeadCache map[string]string } // NewRepositoryDumper creates an gitea Uploader @@ -62,7 +63,7 @@ func NewRepositoryDumper(ctx context.Context, baseDir, repoOwner, repoName strin baseDir: baseDir, repoOwner: repoOwner, repoName: repoName, - prHeadCache: make(map[string]struct{}), + prHeadCache: make(map[string]string), commentFiles: make(map[int64]*os.File), reviewFiles: make(map[int64]*os.File), }, nil @@ -296,8 +297,10 @@ func (g *RepositoryDumper) CreateReleases(releases ...*base.Release) error { } for _, asset := range release.Assets { attachLocalPath := filepath.Join(attachDir, asset.Name) - // download attachment + // SECURITY: We cannot check the DownloadURL and DownloadFunc are safe here + // ... we must assume that they are safe and simply download the attachment + // download attachment err := func(attachPath string) error { var rc io.ReadCloser var err error @@ -317,7 +320,7 @@ func (g *RepositoryDumper) CreateReleases(releases ...*base.Release) error { fw, err := os.Create(attachPath) if err != nil { - return fmt.Errorf("Create: %v", err) + return fmt.Errorf("create: %w", err) } defer fw.Close() @@ -385,27 +388,29 @@ func (g *RepositoryDumper) createItems(dir string, itemFiles map[int64]*os.File, } for number, items := range itemsMap { - var err error - itemFile := itemFiles[number] - if itemFile == nil { - itemFile, err = os.Create(filepath.Join(dir, fmt.Sprintf("%d.yml", number))) - if err != nil { - return err - } - itemFiles[number] = itemFile - } - - bs, err := yaml.Marshal(items) - if err != nil { + if err := g.encodeItems(number, items, dir, itemFiles); err != nil { return err } + } + + return nil +} - if _, err := itemFile.Write(bs); err != nil { +func (g *RepositoryDumper) encodeItems(number int64, items []interface{}, dir string, itemFiles map[int64]*os.File) error { + itemFile := itemFiles[number] + if itemFile == nil { + var err error + itemFile, err = os.Create(filepath.Join(dir, fmt.Sprintf("%d.yml", number))) + if err != nil { return err } + itemFiles[number] = itemFile } - return nil + encoder := yaml.NewEncoder(itemFile) + defer encoder.Close() + + return encoder.Encode(items) } // CreateComments creates comments of issues @@ -418,102 +423,175 @@ func (g *RepositoryDumper) CreateComments(comments ...*base.Comment) error { return g.createItems(g.commentDir(), g.commentFiles, commentsMap) } -// CreatePullRequests creates pull requests -func (g *RepositoryDumper) CreatePullRequests(prs ...*base.PullRequest) error { - for _, pr := range prs { - // download patch file - err := func() error { - u, err := g.setURLToken(pr.PatchURL) - if err != nil { - return err - } - resp, err := http.Get(u) - if err != nil { - return err - } - defer resp.Body.Close() - pullDir := filepath.Join(g.gitPath(), "pulls") - if err = os.MkdirAll(pullDir, os.ModePerm); err != nil { - return err - } - fPath := filepath.Join(pullDir, fmt.Sprintf("%d.patch", pr.Number)) - f, err := os.Create(fPath) - if err != nil { - return err - } - defer f.Close() - if _, err = io.Copy(f, resp.Body); err != nil { - return err - } - pr.PatchURL = "git/pulls/" + fmt.Sprintf("%d.patch", pr.Number) +func (g *RepositoryDumper) handlePullRequest(pr *base.PullRequest) error { + // SECURITY: this pr must have been ensured safe + if !pr.EnsuredSafe { + log.Error("PR #%d in %s/%s has not been checked for safety ... We will ignore this.", pr.Number, g.repoOwner, g.repoName) + return fmt.Errorf("unsafe PR #%d", pr.Number) + } + // First we download the patch file + err := func() error { + // if the patchURL is empty there is nothing to download + if pr.PatchURL == "" { return nil - }() + } + + // SECURITY: We will assume that the pr.PatchURL has been checked + // pr.PatchURL maybe a local file - but note EnsureSafe should be asserting that this safe + u, err := g.setURLToken(pr.PatchURL) if err != nil { return err } - // set head information - pullHead := filepath.Join(g.gitPath(), "refs", "pull", fmt.Sprintf("%d", pr.Number)) - if err := os.MkdirAll(pullHead, os.ModePerm); err != nil { + // SECURITY: We will assume that the pr.PatchURL has been checked + // pr.PatchURL maybe a local file - but note EnsureSafe should be asserting that this safe + resp, err := http.Get(u) // TODO: This probably needs to use the downloader as there may be rate limiting issues here + if err != nil { return err } - p, err := os.Create(filepath.Join(pullHead, "head")) - if err != nil { + defer resp.Body.Close() + pullDir := filepath.Join(g.gitPath(), "pulls") + if err = os.MkdirAll(pullDir, os.ModePerm); err != nil { return err } - _, err = p.WriteString(pr.Head.SHA) - p.Close() + fPath := filepath.Join(pullDir, fmt.Sprintf("%d.patch", pr.Number)) + f, err := os.Create(fPath) if err != nil { return err } + defer f.Close() - if pr.IsForkPullRequest() && pr.State != "closed" { - if pr.Head.OwnerName != "" { - remote := pr.Head.OwnerName - _, ok := g.prHeadCache[remote] - if !ok { - // git remote add - // TODO: how to handle private CloneURL? - err := g.gitRepo.AddRemote(remote, pr.Head.CloneURL, true) - if err != nil { - log.Error("AddRemote failed: %s", err) - } else { - g.prHeadCache[remote] = struct{}{} - ok = true - } - } + // TODO: Should there be limits on the size of this file? + if _, err = io.Copy(f, resp.Body); err != nil { + return err + } + pr.PatchURL = "git/pulls/" + fmt.Sprintf("%d.patch", pr.Number) - if ok { - _, _, err = git.NewCommand(g.ctx, "fetch", remote, pr.Head.Ref).RunStdString(&git.RunOpts{Dir: g.gitPath()}) - if err != nil { - log.Error("Fetch branch from %s failed: %v", pr.Head.CloneURL, err) - } else { - // a new branch name with will be created to as new head branch - ref := path.Join(pr.Head.OwnerName, pr.Head.Ref) - headBranch := filepath.Join(g.gitPath(), "refs", "heads", ref) - if err := os.MkdirAll(filepath.Dir(headBranch), os.ModePerm); err != nil { - return err - } - b, err := os.Create(headBranch) - if err != nil { - return err - } - _, err = b.WriteString(pr.Head.SHA) - b.Close() - if err != nil { - return err - } - pr.Head.Ref = ref - } + return nil + }() + if err != nil { + log.Error("PR #%d in %s/%s unable to download patch: %v", pr.Number, g.repoOwner, g.repoName, err) + return err + } + + isFork := pr.IsForkPullRequest() + + // Even if it's a forked repo PR, we have to change head info as the same as the base info + oldHeadOwnerName := pr.Head.OwnerName + pr.Head.OwnerName, pr.Head.RepoName = pr.Base.OwnerName, pr.Base.RepoName + + if !isFork || pr.State == "closed" { + return nil + } + + // OK we want to fetch the current head as a branch from its CloneURL + + // 1. Is there a head clone URL available? + // 2. Is there a head ref available? + if pr.Head.CloneURL == "" || pr.Head.Ref == "" { + // Set head information if pr.Head.SHA is available + if pr.Head.SHA != "" { + _, _, err = git.NewCommand(g.ctx, "update-ref", "--no-deref", pr.GetGitRefName(), pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.gitPath()}) + if err != nil { + log.Error("PR #%d in %s/%s unable to update-ref for pr HEAD: %v", pr.Number, g.repoOwner, g.repoName, err) + } + } + return nil + } + + // 3. We need to create a remote for this clone url + // ... maybe we already have a name for this remote + remote, ok := g.prHeadCache[pr.Head.CloneURL+":"] + if !ok { + // ... let's try ownername as a reasonable name + remote = oldHeadOwnerName + if !git.IsValidRefPattern(remote) { + // ... let's try something less nice + remote = "head-pr-" + strconv.FormatInt(pr.Number, 10) + } + // ... now add the remote + err := g.gitRepo.AddRemote(remote, pr.Head.CloneURL, true) + if err != nil { + log.Error("PR #%d in %s/%s AddRemote[%s] failed: %v", pr.Number, g.repoOwner, g.repoName, remote, err) + } else { + g.prHeadCache[pr.Head.CloneURL+":"] = remote + ok = true + } + } + if !ok { + // Set head information if pr.Head.SHA is available + if pr.Head.SHA != "" { + _, _, err = git.NewCommand(g.ctx, "update-ref", "--no-deref", pr.GetGitRefName(), pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.gitPath()}) + if err != nil { + log.Error("PR #%d in %s/%s unable to update-ref for pr HEAD: %v", pr.Number, g.repoOwner, g.repoName, err) + } + } + + return nil + } + + // 4. Check if we already have this ref? + localRef, ok := g.prHeadCache[pr.Head.CloneURL+":"+pr.Head.Ref] + if !ok { + // ... We would normally name this migrated branch as / but we need to ensure that is safe + localRef = git.SanitizeRefPattern(oldHeadOwnerName + "/" + pr.Head.Ref) + + // ... Now we must assert that this does not exist + if g.gitRepo.IsBranchExist(localRef) { + localRef = "head-pr-" + strconv.FormatInt(pr.Number, 10) + "/" + localRef + i := 0 + for g.gitRepo.IsBranchExist(localRef) { + if i > 5 { + // ... We tried, we really tried but this is just a seriously unfriendly repo + return fmt.Errorf("unable to create unique local reference from %s", pr.Head.Ref) } + // OK just try some uuids! + localRef = git.SanitizeRefPattern("head-pr-" + strconv.FormatInt(pr.Number, 10) + uuid.New().String()) + i++ } } - // whatever it's a forked repo PR, we have to change head info as the same as the base info - pr.Head.OwnerName = pr.Base.OwnerName - pr.Head.RepoName = pr.Base.RepoName + + fetchArg := pr.Head.Ref + ":" + git.BranchPrefix + localRef + if strings.HasPrefix(fetchArg, "-") { + fetchArg = git.BranchPrefix + fetchArg + } + + _, _, err = git.NewCommand(g.ctx, "fetch", "--no-tags", "--", remote, fetchArg).RunStdString(&git.RunOpts{Dir: g.gitPath()}) + if err != nil { + log.Error("Fetch branch from %s failed: %v", pr.Head.CloneURL, err) + // We need to continue here so that the Head.Ref is reset and we attempt to set the gitref for the PR + // (This last step will likely fail but we should try to do as much as we can.) + } else { + // Cache the localRef as the Head.Ref - if we've failed we can always try again. + g.prHeadCache[pr.Head.CloneURL+":"+pr.Head.Ref] = localRef + } } + // Set the pr.Head.Ref to the localRef + pr.Head.Ref = localRef + + // 5. Now if pr.Head.SHA == "" we should recover this to the head of this branch + if pr.Head.SHA == "" { + headSha, err := g.gitRepo.GetBranchCommitID(localRef) + if err != nil { + log.Error("unable to get head SHA of local head for PR #%d from %s in %s/%s. Error: %v", pr.Number, pr.Head.Ref, g.repoOwner, g.repoName, err) + return nil + } + pr.Head.SHA = headSha + } + if pr.Head.SHA != "" { + _, _, err = git.NewCommand(g.ctx, "update-ref", "--no-deref", pr.GetGitRefName(), pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.gitPath()}) + if err != nil { + log.Error("unable to set %s as the local head for PR #%d from %s in %s/%s. Error: %v", pr.Head.SHA, pr.Number, pr.Head.Ref, g.repoOwner, g.repoName, err) + } + } + + return nil +} + +// CreatePullRequests creates pull requests +func (g *RepositoryDumper) CreatePullRequests(prs ...*base.PullRequest) error { var err error if g.pullrequestFile == nil { if err := os.MkdirAll(g.baseDir, os.ModePerm); err != nil { @@ -525,16 +603,22 @@ func (g *RepositoryDumper) CreatePullRequests(prs ...*base.PullRequest) error { } } - bs, err := yaml.Marshal(prs) - if err != nil { - return err - } + encoder := yaml.NewEncoder(g.pullrequestFile) + defer encoder.Close() - if _, err := g.pullrequestFile.Write(bs); err != nil { - return err + count := 0 + for i := 0; i < len(prs); i++ { + pr := prs[i] + if err := g.handlePullRequest(pr); err != nil { + log.Error("PR #%d in %s/%s failed - skipping", pr.Number, g.repoOwner, g.repoName, err) + continue + } + prs[count] = pr + count++ } + prs = prs[:count] - return nil + return encoder.Encode(prs) } // CreateReviews create pull request reviews diff --git a/services/migrations/gitbucket.go b/services/migrations/gitbucket.go index 92b6cac73806..21d8c672ddfa 100644 --- a/services/migrations/gitbucket.go +++ b/services/migrations/gitbucket.go @@ -6,9 +6,11 @@ package migrations import ( "context" + "fmt" "net/url" "strings" + "code.gitea.io/gitea/modules/log" base "code.gitea.io/gitea/modules/migration" "code.gitea.io/gitea/modules/structs" ) @@ -37,6 +39,7 @@ func (f *GitBucketDownloaderFactory) New(ctx context.Context, opts base.MigrateO oldOwner := fields[1] oldName := strings.TrimSuffix(fields[2], ".git") + log.Trace("Create GitBucket downloader. BaseURL: %s RepoOwner: %s RepoName: %s", baseURL, oldOwner, oldName) return NewGitBucketDownloader(ctx, baseURL, opts.AuthUsername, opts.AuthPassword, opts.AuthToken, oldOwner, oldName), nil } @@ -51,6 +54,20 @@ type GitBucketDownloader struct { *GithubDownloaderV3 } +// String implements Stringer +func (g *GitBucketDownloader) String() string { + return fmt.Sprintf("migration from gitbucket server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + +// ColorFormat provides a basic color format for a GitBucketDownloader +func (g *GitBucketDownloader) ColorFormat(s fmt.State) { + if g == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from gitbucket server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + // NewGitBucketDownloader creates a GitBucket downloader func NewGitBucketDownloader(ctx context.Context, baseURL, userName, password, token, repoOwner, repoName string) *GitBucketDownloader { githubDownloader := NewGithubDownloaderV3(ctx, baseURL, userName, password, token, repoOwner, repoName) diff --git a/services/migrations/gitea_downloader.go b/services/migrations/gitea_downloader.go index f05ee0cb7d75..c52f30269154 100644 --- a/services/migrations/gitea_downloader.go +++ b/services/migrations/gitea_downloader.go @@ -14,7 +14,6 @@ import ( "strings" "time" - admin_model "code.gitea.io/gitea/models/admin" "code.gitea.io/gitea/modules/log" base "code.gitea.io/gitea/modules/migration" "code.gitea.io/gitea/modules/structs" @@ -71,6 +70,7 @@ type GiteaDownloader struct { base.NullDownloader ctx context.Context client *gitea_sdk.Client + baseURL string repoOwner string repoName string pagination bool @@ -117,6 +117,7 @@ func NewGiteaDownloader(ctx context.Context, baseURL, repoPath, username, passwo return &GiteaDownloader{ ctx: ctx, client: giteaClient, + baseURL: baseURL, repoOwner: path[0], repoName: path[1], pagination: paginationSupport, @@ -129,6 +130,20 @@ func (g *GiteaDownloader) SetContext(ctx context.Context) { g.ctx = ctx } +// String implements Stringer +func (g *GiteaDownloader) String() string { + return fmt.Sprintf("migration from gitea server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + +// ColorFormat provides a basic color format for a GiteaDownloader +func (g *GiteaDownloader) ColorFormat(s fmt.State) { + if g == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from gitea server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + // GetRepoInfo returns a repository information func (g *GiteaDownloader) GetRepoInfo() (*base.Repository, error) { if g == nil { @@ -284,6 +299,12 @@ func (g *GiteaDownloader) convertGiteaRelease(rel *gitea_sdk.Release) *base.Rele if err != nil { return nil, err } + + if !hasBaseURL(asset.DownloadURL, g.baseURL) { + WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.ID, g, asset.DownloadURL) + return io.NopCloser(strings.NewReader(asset.DownloadURL)), nil + } + // FIXME: for a private download? req, err := http.NewRequest("GET", asset.DownloadURL, nil) if err != nil { @@ -403,11 +424,7 @@ func (g *GiteaDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, err reactions, err := g.getIssueReactions(issue.Index) if err != nil { - log.Warn("Unable to load reactions during migrating issue #%d to %s/%s. Error: %v", issue.Index, g.repoOwner, g.repoName, err) - if err2 := admin_model.CreateRepositoryNotice( - fmt.Sprintf("Unable to load reactions during migrating issue #%d to %s/%s. Error: %v", issue.Index, g.repoOwner, g.repoName, err)); err2 != nil { - log.Error("create repository notice failed: ", err2) - } + WarnAndNotice("Unable to load reactions during migrating issue #%d in %s. Error: %v", issue.Index, g, err) } var assignees []string @@ -465,11 +482,7 @@ func (g *GiteaDownloader) GetComments(commentable base.Commentable) ([]*base.Com for _, comment := range comments { reactions, err := g.getCommentReactions(comment.ID) if err != nil { - log.Warn("Unable to load comment reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", commentable.GetForeignIndex(), comment.ID, g.repoOwner, g.repoName, err) - if err2 := admin_model.CreateRepositoryNotice( - fmt.Sprintf("Unable to load reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", commentable.GetForeignIndex(), comment.ID, g.repoOwner, g.repoName, err)); err2 != nil { - log.Error("create repository notice failed: ", err2) - } + WarnAndNotice("Unable to load comment reactions during migrating issue #%d for comment %d in %s. Error: %v", commentable.GetForeignIndex(), comment.ID, g, err) } allComments = append(allComments, &base.Comment{ @@ -544,11 +557,7 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques reactions, err := g.getIssueReactions(pr.Index) if err != nil { - log.Warn("Unable to load reactions during migrating pull #%d to %s/%s. Error: %v", pr.Index, g.repoOwner, g.repoName, err) - if err2 := admin_model.CreateRepositoryNotice( - fmt.Sprintf("Unable to load reactions during migrating pull #%d to %s/%s. Error: %v", pr.Index, g.repoOwner, g.repoName, err)); err2 != nil { - log.Error("create repository notice failed: ", err2) - } + WarnAndNotice("Unable to load reactions during migrating pull #%d in %s. Error: %v", pr.Index, g, err) } var assignees []string @@ -605,6 +614,8 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques }, ForeignIndex: pr.Index, }) + // SECURITY: Ensure that the PR is safe + _ = CheckAndEnsureSafePR(allPRs[len(allPRs)-1], g.baseURL, g) } isEnd := len(prs) < perPage diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 79b22bef788e..5bf77e633214 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "os" + "path" "path/filepath" "strconv" "strings" @@ -32,7 +33,7 @@ import ( "code.gitea.io/gitea/modules/uri" "code.gitea.io/gitea/services/pull" - gouuid "github.com/google/uuid" + "github.com/google/uuid" ) var _ base.Uploader = &GiteaLocalUploader{} @@ -48,7 +49,7 @@ type GiteaLocalUploader struct { milestones map[string]int64 issues map[int64]*issues_model.Issue gitRepo *git.Repository - prHeadCache map[string]struct{} + prHeadCache map[string]string sameApp bool userMap map[int64]int64 // external user id mapping to user id prCache map[int64]*issues_model.PullRequest @@ -65,7 +66,7 @@ func NewGiteaLocalUploader(ctx context.Context, doer *user_model.User, repoOwner labels: make(map[string]*issues_model.Label), milestones: make(map[string]int64), issues: make(map[int64]*issues_model.Issue), - prHeadCache: make(map[string]struct{}), + prHeadCache: make(map[string]string), userMap: make(map[int64]int64), prCache: make(map[int64]*issues_model.PullRequest), } @@ -125,7 +126,7 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, opts base.Migrate Mirror: repo.IsMirror, LFS: opts.LFS, LFSEndpoint: opts.LFSEndpoint, - CloneAddr: repo.CloneURL, + CloneAddr: repo.CloneURL, // SECURITY: we will assume that this has already been checked Private: repo.IsPrivate, Wiki: opts.Wiki, Releases: opts.Releases, // if didn't get releases, then sync them from tags @@ -150,13 +151,15 @@ func (g *GiteaLocalUploader) Close() { // CreateTopics creates topics func (g *GiteaLocalUploader) CreateTopics(topics ...string) error { - // ignore topics to long for the db + // Ignore topics too long for the db c := 0 - for i := range topics { - if len(topics[i]) <= 50 { - topics[c] = topics[i] - c++ + for _, topic := range topics { + if len(topic) > 50 { + continue } + + topics[c] = topic + c++ } topics = topics[:c] return repo_model.SaveTopics(g.repo.ID, topics...) @@ -217,11 +220,17 @@ func (g *GiteaLocalUploader) CreateMilestones(milestones ...*base.Milestone) err func (g *GiteaLocalUploader) CreateLabels(labels ...*base.Label) error { lbs := make([]*issues_model.Label, 0, len(labels)) for _, label := range labels { + // We must validate color here: + if !issues_model.LabelColorPattern.MatchString("#" + label.Color) { + log.Warn("Invalid label color: #%s for label: %s in migration to %s/%s", label.Color, label.Name, g.repoOwner, g.repoName) + label.Color = "ffffff" + } + lbs = append(lbs, &issues_model.Label{ RepoID: g.repo.ID, Name: label.Name, Description: label.Description, - Color: fmt.Sprintf("#%s", label.Color), + Color: "#" + label.Color, }) } @@ -247,6 +256,16 @@ func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error { } } + // SECURITY: The TagName must be a valid git ref + if release.TagName != "" && !git.IsValidRefPattern(release.TagName) { + release.TagName = "" + } + + // SECURITY: The TargetCommitish must be a valid git ref + if release.TargetCommitish != "" && !git.IsValidRefPattern(release.TargetCommitish) { + release.TargetCommitish = "" + } + rel := repo_model.Release{ RepoID: g.repo.ID, TagName: release.TagName, @@ -288,14 +307,15 @@ func (g *GiteaLocalUploader) CreateReleases(releases ...*base.Release) error { } } attach := repo_model.Attachment{ - UUID: gouuid.New().String(), + UUID: uuid.New().String(), Name: asset.Name, DownloadCount: int64(*asset.DownloadCount), Size: int64(*asset.Size), CreatedUnix: timeutil.TimeStamp(asset.Created.Unix()), } - // download attachment + // SECURITY: We cannot check the DownloadURL and DownloadFunc are safe here + // ... we must assume that they are safe and simply download the attachment err := func() error { // asset.DownloadURL maybe a local file var rc io.ReadCloser @@ -365,6 +385,12 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error { } } + // SECURITY: issue.Ref needs to be a valid reference + if !git.IsValidRefPattern(issue.Ref) { + log.Warn("Invalid issue.Ref[%s] in issue #%d in %s/%s", issue.Ref, issue.Number, g.repoOwner, g.repoName) + issue.Ref = "" + } + is := issues_model.Issue{ RepoID: g.repo.ID, Repo: g.repo, @@ -496,102 +522,151 @@ func (g *GiteaLocalUploader) CreatePullRequests(prs ...*base.PullRequest) error } func (g *GiteaLocalUploader) updateGitForPullRequest(pr *base.PullRequest) (head string, err error) { - // download patch file + // SECURITY: this pr must have been must have been ensured safe + if !pr.EnsuredSafe { + log.Error("PR #%d in %s/%s has not been checked for safety.", pr.Number, g.repoOwner, g.repoName) + return "", fmt.Errorf("the PR[%d] was not checked for safety", pr.Number) + } + + // Anonymous function to download the patch file (allows us to use defer) err = func() error { + // if the patchURL is empty there is nothing to download if pr.PatchURL == "" { return nil } - // pr.PatchURL maybe a local file - ret, err := uri.Open(pr.PatchURL) + + // SECURITY: We will assume that the pr.PatchURL has been checked + // pr.PatchURL maybe a local file - but note EnsureSafe should be asserting that this safe + ret, err := uri.Open(pr.PatchURL) // TODO: This probably needs to use the downloader as there may be rate limiting issues here if err != nil { return err } defer ret.Close() + pullDir := filepath.Join(g.repo.RepoPath(), "pulls") if err = os.MkdirAll(pullDir, os.ModePerm); err != nil { return err } + f, err := os.Create(filepath.Join(pullDir, fmt.Sprintf("%d.patch", pr.Number))) if err != nil { return err } defer f.Close() + + // TODO: Should there be limits on the size of this file? _, err = io.Copy(f, ret) + return err }() if err != nil { return "", err } - // set head information - pullHead := filepath.Join(g.repo.RepoPath(), "refs", "pull", fmt.Sprintf("%d", pr.Number)) - if err := os.MkdirAll(pullHead, os.ModePerm); err != nil { - return "", err - } - p, err := os.Create(filepath.Join(pullHead, "head")) - if err != nil { - return "", err - } - _, err = p.WriteString(pr.Head.SHA) - p.Close() - if err != nil { - return "", err - } - head = "unknown repository" if pr.IsForkPullRequest() && pr.State != "closed" { - if pr.Head.OwnerName != "" { - remote := pr.Head.OwnerName - _, ok := g.prHeadCache[remote] - if !ok { - // git remote add - err := g.gitRepo.AddRemote(remote, pr.Head.CloneURL, true) - if err != nil { - log.Error("AddRemote failed: %s", err) - } else { - g.prHeadCache[remote] = struct{}{} - ok = true - } + // OK we want to fetch the current head as a branch from its CloneURL + + // 1. Is there a head clone URL available? + // 2. Is there a head ref available? + if pr.Head.CloneURL == "" || pr.Head.Ref == "" { + return head, nil + } + + // 3. We need to create a remote for this clone url + // ... maybe we already have a name for this remote + remote, ok := g.prHeadCache[pr.Head.CloneURL+":"] + if !ok { + // ... let's try ownername as a reasonable name + remote = pr.Head.OwnerName + if !git.IsValidRefPattern(remote) { + // ... let's try something less nice + remote = "head-pr-" + strconv.FormatInt(pr.Number, 10) + } + // ... now add the remote + err := g.gitRepo.AddRemote(remote, pr.Head.CloneURL, true) + if err != nil { + log.Error("PR #%d in %s/%s AddRemote[%s] failed: %v", pr.Number, g.repoOwner, g.repoName, remote, err) + } else { + g.prHeadCache[pr.Head.CloneURL+":"] = remote + ok = true } + } + if !ok { + return head, nil + } - if ok { - _, _, err = git.NewCommand(g.ctx, "fetch", "--no-tags", "--", remote, pr.Head.Ref).RunStdString(&git.RunOpts{Dir: g.repo.RepoPath()}) - if err != nil { - log.Error("Fetch branch from %s failed: %v", pr.Head.CloneURL, err) - } else { - headBranch := filepath.Join(g.repo.RepoPath(), "refs", "heads", pr.Head.OwnerName, pr.Head.Ref) - if err := os.MkdirAll(filepath.Dir(headBranch), os.ModePerm); err != nil { - return "", err - } - b, err := os.Create(headBranch) - if err != nil { - return "", err - } - _, err = b.WriteString(pr.Head.SHA) - b.Close() - if err != nil { - return "", err + // 4. Check if we already have this ref? + localRef, ok := g.prHeadCache[pr.Head.CloneURL+":"+pr.Head.Ref] + if !ok { + // ... We would normally name this migrated branch as / but we need to ensure that is safe + localRef = git.SanitizeRefPattern(pr.Head.OwnerName + "/" + pr.Head.Ref) + + // ... Now we must assert that this does not exist + if g.gitRepo.IsBranchExist(localRef) { + localRef = "head-pr-" + strconv.FormatInt(pr.Number, 10) + "/" + localRef + i := 0 + for g.gitRepo.IsBranchExist(localRef) { + if i > 5 { + // ... We tried, we really tried but this is just a seriously unfriendly repo + return head, nil } - head = pr.Head.OwnerName + "/" + pr.Head.Ref + // OK just try some uuids! + localRef = git.SanitizeRefPattern("head-pr-" + strconv.FormatInt(pr.Number, 10) + uuid.New().String()) + i++ } } + + fetchArg := pr.Head.Ref + ":" + git.BranchPrefix + localRef + if strings.HasPrefix(fetchArg, "-") { + fetchArg = git.BranchPrefix + fetchArg + } + + _, _, err = git.NewCommand(g.ctx, "fetch", "--no-tags", "--", remote, fetchArg).RunStdString(&git.RunOpts{Dir: g.repo.RepoPath()}) + if err != nil { + log.Error("Fetch branch from %s failed: %v", pr.Head.CloneURL, err) + return head, nil + } + g.prHeadCache[pr.Head.CloneURL+":"+pr.Head.Ref] = localRef + head = localRef } - } else { + + // 5. Now if pr.Head.SHA == "" we should recover this to the head of this branch + if pr.Head.SHA == "" { + headSha, err := g.gitRepo.GetBranchCommitID(localRef) + if err != nil { + log.Error("unable to get head SHA of local head for PR #%d from %s in %s/%s. Error: %v", pr.Number, pr.Head.Ref, g.repoOwner, g.repoName, err) + return head, nil + } + pr.Head.SHA = headSha + } + + _, _, err = git.NewCommand(g.ctx, "update-ref", "--no-deref", pr.GetGitRefName(), pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.repo.RepoPath()}) + if err != nil { + return "", err + } + + return head, nil + } + + if pr.Head.Ref != "" { head = pr.Head.Ref - // Ensure the closed PR SHA still points to an existing ref + } + + // Ensure the closed PR SHA still points to an existing ref + if pr.Head.SHA == "" { + // The SHA is empty + log.Warn("Empty reference, no pull head for PR #%d in %s/%s", pr.Number, g.repoOwner, g.repoName) + } else { _, _, err = git.NewCommand(g.ctx, "rev-list", "--quiet", "-1", pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.repo.RepoPath()}) if err != nil { - if pr.Head.SHA != "" { - // Git update-ref remove bad references with a relative path - log.Warn("Deprecated local head, removing : %v", pr.Head.SHA) - err = g.gitRepo.RemoveReference(pr.GetGitRefName()) - } else { - // The SHA is empty, remove the head file - log.Warn("Empty reference, removing : %v", pullHead) - err = os.Remove(filepath.Join(pullHead, "head")) - } + // Git update-ref remove bad references with a relative path + log.Warn("Deprecated local head %s for PR #%d in %s/%s, removing %s", pr.Head.SHA, pr.Number, g.repoOwner, g.repoName, pr.GetGitRefName()) + } else { + // set head information + _, _, err = git.NewCommand(g.ctx, "update-ref", "--no-deref", pr.GetGitRefName(), pr.Head.SHA).RunStdString(&git.RunOpts{Dir: g.repo.RepoPath()}) if err != nil { - log.Error("Cannot remove local head ref, %v", err) + log.Error("unable to set %s as the local head for PR #%d from %s in %s/%s. Error: %v", pr.Head.SHA, pr.Number, pr.Head.Ref, g.repoOwner, g.repoName, err) } } } @@ -615,6 +690,20 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*issues_model return nil, fmt.Errorf("updateGitForPullRequest: %w", err) } + // Now we may need to fix the mergebase + if pr.Base.SHA == "" { + if pr.Base.Ref != "" && pr.Head.SHA != "" { + // A PR against a tag base does not make sense - therefore pr.Base.Ref must be a branch + // TODO: should we be checking for the refs/heads/ prefix on the pr.Base.Ref? (i.e. are these actually branches or refs) + pr.Base.SHA, _, err = g.gitRepo.GetMergeBase("", git.BranchPrefix+pr.Base.Ref, pr.Head.SHA) + if err != nil { + log.Error("Cannot determine the merge base for PR #%d in %s/%s. Error: %v", pr.Number, g.repoOwner, g.repoName, err) + } + } else { + log.Error("Cannot determine the merge base for PR #%d in %s/%s. Not enough information", pr.Number, g.repoOwner, g.repoName) + } + } + if pr.Created.IsZero() { if pr.Closed != nil { pr.Created = *pr.Closed @@ -728,6 +817,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { return err } + cms = append(cms, &cm) + // get pr pr, ok := g.prCache[issue.ID] if !ok { @@ -738,6 +829,17 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { } g.prCache[issue.ID] = pr } + if pr.MergeBase == "" { + // No mergebase -> no basis for any patches + log.Warn("PR #%d in %s/%s: does not have a merge base, all review comments will be ignored", pr.Index, g.repoOwner, g.repoName) + continue + } + + headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + log.Warn("PR #%d GetRefCommitID[%s] in %s/%s: %v, all review comments will be ignored", pr.Index, pr.GetGitRefName(), g.repoOwner, g.repoName, err) + continue + } for _, comment := range review.Comments { line := comment.Line @@ -746,11 +848,9 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { } else { _, _, line, _ = git.ParseDiffHunkString(comment.DiffHunk) } - headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName()) - if err != nil { - log.Warn("GetRefCommitID[%s]: %v, the review comment will be ignored", pr.GetGitRefName(), err) - continue - } + + // SECURITY: The TreePath must be cleaned! + comment.TreePath = path.Clean("/" + comment.TreePath)[1:] var patch string reader, writer := io.Pipe() @@ -775,6 +875,11 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { comment.UpdatedAt = comment.CreatedAt } + if !git.IsValidSHAPattern(comment.CommitID) { + log.Warn("Invalid comment CommitID[%s] on comment[%d] in PR #%d of %s/%s replaced with %s", comment.CommitID, pr.Index, g.repoOwner, g.repoName, headCommitID) + comment.CommitID = headCommitID + } + c := issues_model.Comment{ Type: issues_model.CommentTypeCode, IssueID: issue.ID, @@ -793,8 +898,6 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { cm.Comments = append(cm.Comments, &c) } - - cms = append(cms, &cm) } return issues_model.InsertReviews(cms) diff --git a/services/migrations/gitea_uploader_test.go b/services/migrations/gitea_uploader_test.go index 715dbf7a5c48..af6230decb70 100644 --- a/services/migrations/gitea_uploader_test.go +++ b/services/migrations/gitea_uploader_test.go @@ -390,7 +390,7 @@ func TestGiteaUploadUpdateGitForPullRequest(t *testing.T) { }, }, assertContent: func(t *testing.T, content string) { - assert.Contains(t, content, "AddRemote failed") + assert.Contains(t, content, "AddRemote") }, }, { @@ -439,7 +439,7 @@ func TestGiteaUploadUpdateGitForPullRequest(t *testing.T) { }, }, assertContent: func(t *testing.T, content string) { - assert.Contains(t, content, "Empty reference, removing") + assert.Contains(t, content, "Empty reference") assert.NotContains(t, content, "Cannot remove local head") }, }, @@ -467,7 +467,6 @@ func TestGiteaUploadUpdateGitForPullRequest(t *testing.T) { }, assertContent: func(t *testing.T, content string) { assert.Contains(t, content, "Deprecated local head") - assert.Contains(t, content, "Cannot remove local head") }, }, { @@ -504,6 +503,8 @@ func TestGiteaUploadUpdateGitForPullRequest(t *testing.T) { logger.SetLogger("buffer", "buffer", "{}") defer logger.DelLogger("buffer") + testCase.pr.EnsuredSafe = true + head, err := uploader.updateGitForPullRequest(&testCase.pr) assert.NoError(t, err) assert.EqualValues(t, testCase.head, head) diff --git a/services/migrations/github.go b/services/migrations/github.go index 5f5b430fa9e0..0ffdbb042af2 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -51,7 +51,7 @@ func (f *GithubDownloaderV3Factory) New(ctx context.Context, opts base.MigrateOp oldOwner := fields[1] oldName := strings.TrimSuffix(fields[2], ".git") - log.Trace("Create github downloader: %s/%s", oldOwner, oldName) + log.Trace("Create github downloader BaseURL: %s %s/%s", baseURL, oldOwner, oldName) return NewGithubDownloaderV3(ctx, baseURL, opts.AuthUsername, opts.AuthPassword, opts.AuthToken, oldOwner, oldName), nil } @@ -67,6 +67,7 @@ type GithubDownloaderV3 struct { base.NullDownloader ctx context.Context clients []*github.Client + baseURL string repoOwner string repoName string userName string @@ -81,6 +82,7 @@ type GithubDownloaderV3 struct { func NewGithubDownloaderV3(ctx context.Context, baseURL, userName, password, token, repoOwner, repoName string) *GithubDownloaderV3 { downloader := GithubDownloaderV3{ userName: userName, + baseURL: baseURL, password: password, ctx: ctx, repoOwner: repoOwner, @@ -118,6 +120,20 @@ func NewGithubDownloaderV3(ctx context.Context, baseURL, userName, password, tok return &downloader } +// String implements Stringer +func (g *GithubDownloaderV3) String() string { + return fmt.Sprintf("migration from github server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + +// ColorFormat provides a basic color format for a GithubDownloader +func (g *GithubDownloaderV3) ColorFormat(s fmt.State) { + if g == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from github server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + func (g *GithubDownloaderV3) addClient(client *http.Client, baseURL string) { githubClient := github.NewClient(client) if baseURL != "https://github.com" { @@ -322,33 +338,44 @@ func (g *GithubDownloaderV3) convertGithubRelease(rel *github.RepositoryRelease) Updated: asset.UpdatedAt.Time, DownloadFunc: func() (io.ReadCloser, error) { g.waitAndPickClient() - asset, redirectURL, err := g.getClient().Repositories.DownloadReleaseAsset(g.ctx, g.repoOwner, g.repoName, assetID, nil) + readCloser, redirectURL, err := g.getClient().Repositories.DownloadReleaseAsset(g.ctx, g.repoOwner, g.repoName, assetID, nil) if err != nil { return nil, err } if err := g.RefreshRate(); err != nil { log.Error("g.getClient().RateLimits: %s", err) } - if asset == nil { - if redirectURL != "" { - g.waitAndPickClient() - req, err := http.NewRequestWithContext(g.ctx, "GET", redirectURL, nil) - if err != nil { - return nil, err - } - resp, err := httpClient.Do(req) - err1 := g.RefreshRate() - if err1 != nil { - log.Error("g.getClient().RateLimits: %s", err1) - } - if err != nil { - return nil, err - } - return resp.Body, nil - } - return nil, fmt.Errorf("No release asset found for %d", assetID) + + if readCloser != nil { + return readCloser, nil + } + + if redirectURL == "" { + return nil, fmt.Errorf("no release asset found for %d", assetID) + } + + // Prevent open redirect + if !hasBaseURL(redirectURL, g.baseURL) && + !hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") { + WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.GetID(), g, redirectURL) + + return io.NopCloser(strings.NewReader(redirectURL)), nil + } + + g.waitAndPickClient() + req, err := http.NewRequestWithContext(g.ctx, "GET", redirectURL, nil) + if err != nil { + return nil, err } - return asset, nil + resp, err := httpClient.Do(req) + err1 := g.RefreshRate() + if err1 != nil { + log.Error("g.RefreshRate(): %s", err1) + } + if err != nil { + return nil, err + } + return resp.Body, nil }, }) } @@ -697,7 +724,7 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq SHA: pr.GetHead().GetSHA(), OwnerName: pr.GetHead().GetUser().GetLogin(), RepoName: pr.GetHead().GetRepo().GetName(), - CloneURL: pr.GetHead().GetRepo().GetCloneURL(), + CloneURL: pr.GetHead().GetRepo().GetCloneURL(), // see below for SECURITY related issues here }, Base: base.PullRequestBranch{ Ref: pr.GetBase().GetRef(), @@ -705,10 +732,13 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq RepoName: pr.GetBase().GetRepo().GetName(), OwnerName: pr.GetBase().GetUser().GetLogin(), }, - PatchURL: pr.GetPatchURL(), + PatchURL: pr.GetPatchURL(), // see below for SECURITY related issues here Reactions: reactions, ForeignIndex: int64(*pr.Number), }) + + // SECURITY: Ensure that the PR is safe + _ = CheckAndEnsureSafePR(allPRs[len(allPRs)-1], g.baseURL, g) } return allPRs, len(prs) < perPage, nil diff --git a/services/migrations/gitlab.go b/services/migrations/gitlab.go index 1919ad4dc6f9..95bec59e8347 100644 --- a/services/migrations/gitlab.go +++ b/services/migrations/gitlab.go @@ -63,6 +63,7 @@ type GitlabDownloader struct { base.NullDownloader ctx context.Context client *gitlab.Client + baseURL string repoID int repoName string issueCount int64 @@ -125,12 +126,27 @@ func NewGitlabDownloader(ctx context.Context, baseURL, repoPath, username, passw return &GitlabDownloader{ ctx: ctx, client: gitlabClient, + baseURL: baseURL, repoID: gr.ID, repoName: gr.Name, maxPerPage: 100, }, nil } +// String implements Stringer +func (g *GitlabDownloader) String() string { + return fmt.Sprintf("migration from gitlab server %s [%d]/%s", g.baseURL, g.repoID, g.repoName) +} + +// ColorFormat provides a basic color format for a GitlabDownloader +func (g *GitlabDownloader) ColorFormat(s fmt.State) { + if g == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from gitlab server %s [%d]/%s", g.baseURL, g.repoID, g.repoName) +} + // SetContext set context func (g *GitlabDownloader) SetContext(ctx context.Context) { g.ctx = ctx @@ -308,6 +324,11 @@ func (g *GitlabDownloader) convertGitlabRelease(rel *gitlab.Release) *base.Relea return nil, err } + if !hasBaseURL(link.URL, g.baseURL) { + WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.ID, g, link.URL) + return io.NopCloser(strings.NewReader(link.URL)), nil + } + req, err := http.NewRequest("GET", link.URL, nil) if err != nil { return nil, err @@ -612,6 +633,9 @@ func (g *GitlabDownloader) GetPullRequests(page, perPage int) ([]*base.PullReque ForeignIndex: int64(pr.IID), Context: gitlabIssueContext{IsMergeRequest: true}, }) + + // SECURITY: Ensure that the PR is safe + _ = CheckAndEnsureSafePR(allPRs[len(allPRs)-1], g.baseURL, g) } return allPRs, len(prs) < perPage, nil diff --git a/services/migrations/gogs.go b/services/migrations/gogs.go index a28033218eac..46cc3ca41646 100644 --- a/services/migrations/gogs.go +++ b/services/migrations/gogs.go @@ -73,6 +73,20 @@ type GogsDownloader struct { transport http.RoundTripper } +// String implements Stringer +func (g *GogsDownloader) String() string { + return fmt.Sprintf("migration from gogs server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + +// ColorFormat provides a basic color format for a GogsDownloader +func (g *GogsDownloader) ColorFormat(s fmt.State) { + if g == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from gogs server %s %s/%s", g.baseURL, g.repoOwner, g.repoName) +} + // SetContext set context func (g *GogsDownloader) SetContext(ctx context.Context) { g.ctx = ctx diff --git a/services/migrations/migrate.go b/services/migrations/migrate.go index a5715072c513..040f0aebb192 100644 --- a/services/migrations/migrate.go +++ b/services/migrations/migrate.go @@ -198,19 +198,25 @@ func migrateRepository(doer *user_model.User, downloader base.Downloader, upload return err } - // If the downloader is not a RepositoryRestorer then we need to recheck the CloneURL + // SECURITY: If the downloader is not a RepositoryRestorer then we need to recheck the CloneURL if _, ok := downloader.(*RepositoryRestorer); !ok { // Now the clone URL can be rewritten by the downloader so we must recheck if err := IsMigrateURLAllowed(repo.CloneURL, doer); err != nil { return err } - // And so can the original URL too so again we must recheck - if repo.OriginalURL != "" { - if err := IsMigrateURLAllowed(repo.OriginalURL, doer); err != nil { - return err + // SECURITY: Ensure that we haven't been redirected from an external to a local filesystem + // Now we know all of these must parse + cloneAddrURL, _ := url.Parse(opts.CloneAddr) + cloneURL, _ := url.Parse(repo.CloneURL) + + if cloneURL.Scheme == "file" || cloneURL.Scheme == "" { + if cloneAddrURL.Scheme != "file" && cloneAddrURL.Scheme != "" { + return fmt.Errorf("repo info has changed from external to local filesystem") } } + + // We don't actually need to check the OriginalURL as it isn't used anywhere } log.Trace("migrating git data from %s", repo.CloneURL) diff --git a/services/migrations/onedev.go b/services/migrations/onedev.go index a46ba35f722b..8cc826c3b4f8 100644 --- a/services/migrations/onedev.go +++ b/services/migrations/onedev.go @@ -110,6 +110,20 @@ func NewOneDevDownloader(ctx context.Context, baseURL *url.URL, username, passwo return downloader } +// String implements Stringer +func (d *OneDevDownloader) String() string { + return fmt.Sprintf("migration from oneDev server %s [%d]/%s", d.baseURL, d.repoID, d.repoName) +} + +// ColorFormat provides a basic color format for a OneDevDownloader +func (d *OneDevDownloader) ColorFormat(s fmt.State) { + if d == nil { + log.ColorFprintf(s, "") + return + } + log.ColorFprintf(s, "migration from oneDev server %s [%d]/%s", d.baseURL, d.repoID, d.repoName) +} + func (d *OneDevDownloader) callAPI(endpoint string, parameter map[string]string, result interface{}) error { u, err := d.baseURL.Parse(endpoint) if err != nil { @@ -542,6 +556,9 @@ func (d *OneDevDownloader) GetPullRequests(page, perPage int) ([]*base.PullReque ForeignIndex: pr.ID, Context: onedevIssueContext{IsPullRequest: true}, }) + + // SECURITY: Ensure that the PR is safe + _ = CheckAndEnsureSafePR(pullRequests[len(pullRequests)-1], d.baseURL.String(), d) } return pullRequests, len(pullRequests) == 0, nil diff --git a/services/migrations/restore.go b/services/migrations/restore.go index 8c9654a7e3c2..c3fbcbb25fa8 100644 --- a/services/migrations/restore.go +++ b/services/migrations/restore.go @@ -243,6 +243,7 @@ func (r *RepositoryRestorer) GetPullRequests(page, perPage int) ([]*base.PullReq } for _, pr := range pulls { pr.PatchURL = "file://" + filepath.Join(r.baseDir, pr.PatchURL) + CheckAndEnsureSafePR(pr, "", r) } return pulls, true, nil } diff --git a/services/release/release.go b/services/release/release.go index e2e8c1369990..ae610b0e3c17 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -37,6 +37,9 @@ func createTag(gitRepo *git.Repository, rel *repo_model.Release, msg string) (bo if err != nil { return false, fmt.Errorf("GetProtectedTags: %v", err) } + + // Trim '--' prefix to prevent command line argument vulnerability. + rel.TagName = strings.TrimPrefix(rel.TagName, "--") isAllowed, err := git_model.IsUserAllowedToControlTag(protectedTags, rel.TagName, rel.PublisherID) if err != nil { return false, err @@ -52,8 +55,6 @@ func createTag(gitRepo *git.Repository, rel *repo_model.Release, msg string) (bo return false, fmt.Errorf("createTag::GetCommit[%v]: %v", rel.Target, err) } - // Trim '--' prefix to prevent command line argument vulnerability. - rel.TagName = strings.TrimPrefix(rel.TagName, "--") if len(msg) > 0 { if err = gitRepo.CreateAnnotatedTag(rel.TagName, msg, commit.ID.String()); err != nil { if strings.Contains(err.Error(), "is not a valid tag name") { @@ -308,7 +309,7 @@ func DeleteReleaseByID(ctx context.Context, id int64, doer *user_model.User, del } } - if stdout, _, err := git.NewCommand(ctx, "tag", "-d", rel.TagName). + if stdout, _, err := git.NewCommand(ctx, "tag", "-d", "--", rel.TagName). SetDescription(fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID)). RunStdString(&git.RunOpts{Dir: repo.RepoPath()}); err != nil && !strings.Contains(err.Error(), "not found") { log.Error("DeleteReleaseByID (git tag -d): %d in %v Failed:\nStdout: %s\nError: %v", rel.ID, repo, stdout, err) From be14e79e9884dca98147fbc24f8b336b9b84ac86 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Sun, 4 Sep 2022 16:01:23 +0200 Subject: [PATCH 18/22] Fix 500 on time tracking in timeline API (#21052) Fix #21041 --- modules/convert/issue_comment.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/convert/issue_comment.go b/modules/convert/issue_comment.go index ccc94b249636..73ad345fa43f 100644 --- a/modules/convert/issue_comment.go +++ b/modules/convert/issue_comment.go @@ -101,6 +101,12 @@ func ToTimelineComment(c *issues_model.Comment, doer *user_model.User) *api.Time } if c.Time != nil { + err = c.Time.LoadAttributes() + if err != nil { + log.Error("Time.LoadAttributes: %v", err) + return nil + } + comment.TrackedTime = ToTrackedTime(c.Time) } From c722a26e7efa69370804ac04590e9e467decc093 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 4 Sep 2022 16:13:23 +0100 Subject: [PATCH 19/22] Set uploadpack.allowFilter etc on gitea serv to enable partial clones with ssh (#20902) When setting.Git.DisablePartialClone is set to false then the web server will add filter support to web http. It does this by using`-c` command arguments but this will not work on gitea serv as the upload-pack and receive-pack commands do not support this. Instead we move these options into the .gitconfig instead. Fix #20400 Signed-off-by: Andrew Thornton --- modules/git/git.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/git/git.go b/modules/git/git.go index 99849f1f0945..28899222e7ef 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -185,11 +185,6 @@ func InitFull(ctx context.Context) (err error) { globalCommandArgs = append(globalCommandArgs, "-c", "protocol.version=2") } - // By default partial clones are disabled, enable them from git v2.22 - if !setting.Git.DisablePartialClone && CheckGitVersionAtLeast("2.22") == nil { - globalCommandArgs = append(globalCommandArgs, "-c", "uploadpack.allowfilter=true", "-c", "uploadpack.allowAnySHA1InWant=true") - } - // Explicitly disable credential helper, otherwise Git credentials might leak if CheckGitVersionAtLeast("2.9") == nil { globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=") @@ -286,7 +281,20 @@ func syncGitConfig() (err error) { } } - return nil + // By default partial clones are disabled, enable them from git v2.22 + if !setting.Git.DisablePartialClone && CheckGitVersionAtLeast("2.22") == nil { + if err = configSet("uploadpack.allowfilter", "true"); err != nil { + return err + } + err = configSet("uploadpack.allowAnySHA1InWant", "true") + } else { + if err = configUnsetAll("uploadpack.allowfilter", "true"); err != nil { + return err + } + err = configUnsetAll("uploadpack.allowAnySHA1InWant", "true") + } + + return err } // CheckGitVersionAtLeast check git version is at least the constraint version From 8b0aaa5f86e40a4699f278d09d116add63f8e4a0 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Sun, 4 Sep 2022 23:14:53 +0800 Subject: [PATCH 20/22] test: use `T.TempDir` to create temporary test directory (#21043) A testing cleanup. This pull request replaces `os.MkdirTemp` with `t.TempDir`. We can use the `T.TempDir` function from the `testing` package to create temporary directory. The directory created by `T.TempDir` is automatically removed when the test and all its subtests complete. This saves us at least 2 lines (error check, and cleanup) on every instance, or in some cases adds cleanup that we forgot. Reference: https://pkg.go.dev/testing#T.TempDir ```go func TestFoo(t *testing.T) { // before tmpDir, err := os.MkdirTemp("", "") require.NoError(t, err) defer os.RemoveAll(tmpDir) // now tmpDir := t.TempDir() } ``` Signed-off-by: Eng Zer Jun --- cmd/migrate_storage_test.go | 3 +-- models/db/engine_test.go | 4 +-- modules/git/commit_info_test.go | 17 +++---------- modules/git/repo_compare_test.go | 8 ++---- modules/git/repo_tag_test.go | 8 ++---- modules/indexer/code/bleve_test.go | 10 +------- modules/indexer/issues/bleve_test.go | 13 ++-------- modules/indexer/issues/indexer_test.go | 9 +------ modules/log/file_test.go | 20 ++++----------- modules/queue/queue_disk_channel_test.go | 10 ++------ modules/queue/queue_disk_test.go | 7 +----- routers/web/repo/settings_test.go | 9 +------ services/wiki/wiki_test.go | 12 ++------- tests/integration/api_repo_file_get_test.go | 10 ++------ tests/integration/api_repo_test.go | 8 ------ tests/integration/create_no_session_test.go | 9 +------ tests/integration/git_clone_wiki_test.go | 3 +-- .../git_helper_for_declarative_test.go | 10 +++----- tests/integration/git_test.go | 21 ++++------------ tests/integration/gpg_git_test.go | 7 ++---- tests/integration/lfs_local_endpoint_test.go | 9 +++---- tests/integration/migrate_test.go | 11 +++++--- tests/integration/repo_tag_test.go | 8 ++---- tests/integration/ssh_key_test.go | 25 +++++-------------- 24 files changed, 57 insertions(+), 194 deletions(-) diff --git a/cmd/migrate_storage_test.go b/cmd/migrate_storage_test.go index e6d205e4109d..0d264ef5a1bd 100644 --- a/cmd/migrate_storage_test.go +++ b/cmd/migrate_storage_test.go @@ -53,8 +53,7 @@ func TestMigratePackages(t *testing.T) { ctx := context.Background() - p, err := os.MkdirTemp(os.TempDir(), "migrated_packages") - assert.NoError(t, err) + p := t.TempDir() dstStorage, err := storage.NewLocalStorage( ctx, diff --git a/models/db/engine_test.go b/models/db/engine_test.go index 41279c5005f8..c26d94c3405e 100644 --- a/models/db/engine_test.go +++ b/models/db/engine_test.go @@ -5,7 +5,6 @@ package db_test import ( - "os" "path/filepath" "testing" @@ -20,8 +19,7 @@ import ( func TestDumpDatabase(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) - dir, err := os.MkdirTemp(os.TempDir(), "dump") - assert.NoError(t, err) + dir := t.TempDir() type Version struct { ID int64 `xorm:"pk autoincr"` diff --git a/modules/git/commit_info_test.go b/modules/git/commit_info_test.go index a12452c4040b..4bc359689670 100644 --- a/modules/git/commit_info_test.go +++ b/modules/git/commit_info_test.go @@ -6,13 +6,10 @@ package git import ( "context" - "os" "path/filepath" "testing" "time" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" ) @@ -20,18 +17,14 @@ const ( testReposDir = "tests/repos/" ) -func cloneRepo(url, name string) (string, error) { - repoDir, err := os.MkdirTemp("", name) - if err != nil { - return "", err - } +func cloneRepo(tb testing.TB, url string) (string, error) { + repoDir := tb.TempDir() if err := Clone(DefaultContext, url, repoDir, CloneRepoOptions{ Mirror: false, Bare: false, Quiet: true, Timeout: 5 * time.Minute, }); err != nil { - _ = util.RemoveAll(repoDir) return "", err } return repoDir, nil @@ -118,11 +111,10 @@ func TestEntries_GetCommitsInfo(t *testing.T) { testGetCommitsInfo(t, bareRepo1) - clonedPath, err := cloneRepo(bareRepo1Path, "repo1_TestEntries_GetCommitsInfo") + clonedPath, err := cloneRepo(t, bareRepo1Path) if err != nil { assert.NoError(t, err) } - defer util.RemoveAll(clonedPath) clonedRepo1, err := openRepositoryWithDefaultContext(clonedPath) if err != nil { assert.NoError(t, err) @@ -150,11 +142,10 @@ func BenchmarkEntries_GetCommitsInfo(b *testing.B) { var commit *Commit var entries Entries var repo *Repository - repoPath, err := cloneRepo(benchmark.url, benchmark.name) + repoPath, err := cloneRepo(b, benchmark.url) if err != nil { b.Fatal(err) } - defer util.RemoveAll(repoPath) if repo, err = openRepositoryWithDefaultContext(repoPath); err != nil { b.Fatal(err) diff --git a/modules/git/repo_compare_test.go b/modules/git/repo_compare_test.go index 245920c2bdc1..63f7254dea98 100644 --- a/modules/git/repo_compare_test.go +++ b/modules/git/repo_compare_test.go @@ -10,19 +10,16 @@ import ( "path/filepath" "testing" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" ) func TestGetFormatPatch(t *testing.T) { bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") - clonedPath, err := cloneRepo(bareRepo1Path, "repo1_TestGetFormatPatch") + clonedPath, err := cloneRepo(t, bareRepo1Path) if err != nil { assert.NoError(t, err) return } - defer util.RemoveAll(clonedPath) repo, err := openRepositoryWithDefaultContext(clonedPath) if err != nil { @@ -84,12 +81,11 @@ func TestReadWritePullHead(t *testing.T) { bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") // As we are writing we should clone the repository first - clonedPath, err := cloneRepo(bareRepo1Path, "TestReadWritePullHead") + clonedPath, err := cloneRepo(t, bareRepo1Path) if err != nil { assert.NoError(t, err) return } - defer util.RemoveAll(clonedPath) repo, err := openRepositoryWithDefaultContext(clonedPath) if err != nil { diff --git a/modules/git/repo_tag_test.go b/modules/git/repo_tag_test.go index 9d8467286205..6a00473bb794 100644 --- a/modules/git/repo_tag_test.go +++ b/modules/git/repo_tag_test.go @@ -8,8 +8,6 @@ import ( "path/filepath" "testing" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -38,12 +36,11 @@ func TestRepository_GetTags(t *testing.T) { func TestRepository_GetTag(t *testing.T) { bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") - clonedPath, err := cloneRepo(bareRepo1Path, "TestRepository_GetTag") + clonedPath, err := cloneRepo(t, bareRepo1Path) if err != nil { assert.NoError(t, err) return } - defer util.RemoveAll(clonedPath) bareRepo1, err := openRepositoryWithDefaultContext(clonedPath) if err != nil { @@ -143,12 +140,11 @@ func TestRepository_GetTag(t *testing.T) { func TestRepository_GetAnnotatedTag(t *testing.T) { bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") - clonedPath, err := cloneRepo(bareRepo1Path, "TestRepository_GetAnnotatedTag") + clonedPath, err := cloneRepo(t, bareRepo1Path) if err != nil { assert.NoError(t, err) return } - defer util.RemoveAll(clonedPath) bareRepo1, err := openRepositoryWithDefaultContext(clonedPath) if err != nil { diff --git a/modules/indexer/code/bleve_test.go b/modules/indexer/code/bleve_test.go index 37ed2eb9f021..a34d54bc0e19 100644 --- a/modules/indexer/code/bleve_test.go +++ b/modules/indexer/code/bleve_test.go @@ -5,11 +5,9 @@ package code import ( - "os" "testing" "code.gitea.io/gitea/models/unittest" - "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) @@ -17,13 +15,7 @@ import ( func TestBleveIndexAndSearch(t *testing.T) { unittest.PrepareTestEnv(t) - dir, err := os.MkdirTemp("", "bleve.index") - assert.NoError(t, err) - if err != nil { - assert.Fail(t, "Unable to create temporary directory") - return - } - defer util.RemoveAll(dir) + dir := t.TempDir() idx, _, err := NewBleveIndexer(dir) if err != nil { diff --git a/modules/indexer/issues/bleve_test.go b/modules/indexer/issues/bleve_test.go index 68a7831a3f9b..42d22f06a2db 100644 --- a/modules/indexer/issues/bleve_test.go +++ b/modules/indexer/issues/bleve_test.go @@ -6,22 +6,13 @@ package issues import ( "context" - "os" "testing" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" ) func TestBleveIndexAndSearch(t *testing.T) { - dir, err := os.MkdirTemp("", "bleve.index") - assert.NoError(t, err) - if err != nil { - assert.Fail(t, "Unable to create temporary directory") - return - } - defer util.RemoveAll(dir) + dir := t.TempDir() indexer := NewBleveIndexer(dir) defer indexer.Close() @@ -30,7 +21,7 @@ func TestBleveIndexAndSearch(t *testing.T) { return } - err = indexer.Index([]*IndexerData{ + err := indexer.Index([]*IndexerData{ { ID: 1, RepoID: 2, diff --git a/modules/indexer/issues/indexer_test.go b/modules/indexer/issues/indexer_test.go index 6bafcbdf24d3..e8b9ff837088 100644 --- a/modules/indexer/issues/indexer_test.go +++ b/modules/indexer/issues/indexer_test.go @@ -6,7 +6,6 @@ package issues import ( "context" - "os" "path" "path/filepath" "testing" @@ -14,7 +13,6 @@ import ( "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" _ "code.gitea.io/gitea/models" @@ -32,11 +30,7 @@ func TestBleveSearchIssues(t *testing.T) { assert.NoError(t, unittest.PrepareTestDatabase()) setting.Cfg = ini.Empty() - tmpIndexerDir, err := os.MkdirTemp("", "issues-indexer") - if err != nil { - assert.Fail(t, "Unable to create temporary directory: %v", err) - return - } + tmpIndexerDir := t.TempDir() setting.Cfg.Section("queue.issue_indexer").Key("DATADIR").MustString(path.Join(tmpIndexerDir, "issues.queue")) @@ -44,7 +38,6 @@ func TestBleveSearchIssues(t *testing.T) { setting.Indexer.IssuePath = path.Join(tmpIndexerDir, "issues.queue") defer func() { setting.Indexer.IssuePath = oldIssuePath - util.RemoveAll(tmpIndexerDir) }() setting.Indexer.IssueType = "bleve" diff --git a/modules/log/file_test.go b/modules/log/file_test.go index c3074b69df9e..cc2b9fe07721 100644 --- a/modules/log/file_test.go +++ b/modules/log/file_test.go @@ -14,15 +14,11 @@ import ( "testing" "time" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" ) func TestFileLoggerFails(t *testing.T) { - tmpDir, err := os.MkdirTemp("", "TestFileLogger") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() prefix := "TestPrefix " level := INFO @@ -34,7 +30,7 @@ func TestFileLoggerFails(t *testing.T) { // assert.True(t, ok) // Fail if there is bad json - err = fileLogger.Init("{") + err := fileLogger.Init("{") assert.Error(t, err) // Fail if there is no filename @@ -47,9 +43,7 @@ func TestFileLoggerFails(t *testing.T) { } func TestFileLogger(t *testing.T) { - tmpDir, err := os.MkdirTemp("", "TestFileLogger") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() prefix := "TestPrefix " level := INFO @@ -150,9 +144,7 @@ func TestFileLogger(t *testing.T) { } func TestCompressFileLogger(t *testing.T) { - tmpDir, err := os.MkdirTemp("", "TestFileLogger") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() prefix := "TestPrefix " level := INFO @@ -210,9 +202,7 @@ func TestCompressFileLogger(t *testing.T) { } func TestCompressOldFile(t *testing.T) { - tmpDir, err := os.MkdirTemp("", "TestFileLogger") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() fname := filepath.Join(tmpDir, "test") nonGzip := filepath.Join(tmpDir, "test-nonGzip") diff --git a/modules/queue/queue_disk_channel_test.go b/modules/queue/queue_disk_channel_test.go index 22b4f0f452ef..b1820e73acaf 100644 --- a/modules/queue/queue_disk_channel_test.go +++ b/modules/queue/queue_disk_channel_test.go @@ -5,13 +5,11 @@ package queue import ( - "os" "sync" "testing" "time" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) @@ -33,9 +31,7 @@ func TestPersistableChannelQueue(t *testing.T) { queueShutdown := []func(){} queueTerminate := []func(){} - tmpDir, err := os.MkdirTemp("", "persistable-channel-queue-test-data") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() queue, err := NewPersistableChannelQueue(handle, PersistableChannelQueueConfiguration{ DataDir: tmpDir, @@ -223,9 +219,7 @@ func TestPersistableChannelQueue_Pause(t *testing.T) { queueTerminate := []func(){} terminated := make(chan struct{}) - tmpDir, err := os.MkdirTemp("", "persistable-channel-queue-pause-test-data") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() queue, err = NewPersistableChannelQueue(handle, PersistableChannelQueueConfiguration{ DataDir: tmpDir, diff --git a/modules/queue/queue_disk_test.go b/modules/queue/queue_disk_test.go index d2d8e135cb6c..b0835c896fee 100644 --- a/modules/queue/queue_disk_test.go +++ b/modules/queue/queue_disk_test.go @@ -5,13 +5,10 @@ package queue import ( - "os" "sync" "testing" "time" - "code.gitea.io/gitea/modules/util" - "github.com/stretchr/testify/assert" ) @@ -30,9 +27,7 @@ func TestLevelQueue(t *testing.T) { queueShutdown := []func(){} queueTerminate := []func(){} - tmpDir, err := os.MkdirTemp("", "level-queue-test-data") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() queue, err := NewLevelQueue(handle, LevelQueueConfiguration{ ByteFIFOQueueConfiguration: ByteFIFOQueueConfiguration{ diff --git a/routers/web/repo/settings_test.go b/routers/web/repo/settings_test.go index 946220b4fc0e..4acd7df5b81c 100644 --- a/routers/web/repo/settings_test.go +++ b/routers/web/repo/settings_test.go @@ -6,7 +6,6 @@ package repo import ( "net/http" - "os" "testing" "code.gitea.io/gitea/models" @@ -19,7 +18,6 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/services/forms" @@ -27,18 +25,13 @@ import ( ) func createSSHAuthorizedKeysTmpPath(t *testing.T) func() { - tmpDir, err := os.MkdirTemp("", "tmp-ssh") - if err != nil { - assert.Fail(t, "Unable to create temporary directory: %v", err) - return nil - } + tmpDir := t.TempDir() oldPath := setting.SSH.RootPath setting.SSH.RootPath = tmpDir return func() { setting.SSH.RootPath = oldPath - util.RemoveAll(tmpDir) } } diff --git a/services/wiki/wiki_test.go b/services/wiki/wiki_test.go index 938a7d6acd95..cabeecb60afb 100644 --- a/services/wiki/wiki_test.go +++ b/services/wiki/wiki_test.go @@ -5,7 +5,6 @@ package wiki import ( - "os" "path/filepath" "testing" @@ -13,7 +12,6 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) @@ -273,15 +271,9 @@ func TestPrepareWikiFileName_FirstPage(t *testing.T) { unittest.PrepareTestEnv(t) // Now create a temporaryDirectory - tmpDir, err := os.MkdirTemp("", "empty-wiki") - assert.NoError(t, err) - defer func() { - if _, err := os.Stat(tmpDir); !os.IsNotExist(err) { - _ = util.RemoveAll(tmpDir) - } - }() + tmpDir := t.TempDir() - err = git.InitRepository(git.DefaultContext, tmpDir, true) + err := git.InitRepository(git.DefaultContext, tmpDir, true) assert.NoError(t, err) gitRepo, err := git.OpenRepository(git.DefaultContext, tmpDir) diff --git a/tests/integration/api_repo_file_get_test.go b/tests/integration/api_repo_file_get_test.go index 2a7a5fa63453..cca72c2b3ec8 100644 --- a/tests/integration/api_repo_file_get_test.go +++ b/tests/integration/api_repo_file_get_test.go @@ -7,11 +7,9 @@ package integration import ( "net/http" "net/url" - "os" "testing" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -30,18 +28,14 @@ func TestAPIGetRawFileOrLFS(t *testing.T) { httpContext := NewAPITestContext(t, "user2", "repo-lfs-test") doAPICreateRepository(httpContext, false, func(t *testing.T, repository api.Repository) { u.Path = httpContext.GitPath() - dstPath, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() u.Path = httpContext.GitPath() u.User = url.UserPassword("user2", userPassword) t.Run("Clone", doGitClone(dstPath, u)) - dstPath2, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath2) + dstPath2 := t.TempDir() t.Run("Partial Clone", doPartialGitClone(dstPath2, u)) diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index 483503ccbbcd..bfe0c0aa9c58 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -8,7 +8,6 @@ import ( "fmt" "net/http" "net/url" - "os" "testing" "code.gitea.io/gitea/models" @@ -19,7 +18,6 @@ import ( user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -389,9 +387,6 @@ func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) { httpContext := baseAPITestContext httpContext.Reponame = "repo-tmp-17" - dstPath, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) t.Run("CreateRepo", doAPICreateRepository(httpContext, false)) user, err := user_model.GetUserByName(db.DefaultContext, httpContext.Username) @@ -473,9 +468,6 @@ func testAPIRepoCreateConflict(t *testing.T, u *url.URL) { httpContext := baseAPITestContext httpContext.Reponame = "repo-tmp-17" - dstPath, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) t.Run("CreateRepo", doAPICreateRepository(httpContext, false)) req := NewRequestWithJSON(t, "POST", "/api/v1/user/repos?token="+httpContext.Token, diff --git a/tests/integration/create_no_session_test.go b/tests/integration/create_no_session_test.go index c9b90974d7b7..c617b1828a1d 100644 --- a/tests/integration/create_no_session_test.go +++ b/tests/integration/create_no_session_test.go @@ -14,7 +14,6 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers" "code.gitea.io/gitea/tests" @@ -70,13 +69,7 @@ func TestSessionFileCreation(t *testing.T) { config.Provider = "file" // Now create a temporaryDirectory - tmpDir, err := os.MkdirTemp("", "sessions") - assert.NoError(t, err) - defer func() { - if _, err := os.Stat(tmpDir); !os.IsNotExist(err) { - _ = util.RemoveAll(tmpDir) - } - }() + tmpDir := t.TempDir() config.ProviderConfig = tmpDir newConfigBytes, err := json.Marshal(config) diff --git a/tests/integration/git_clone_wiki_test.go b/tests/integration/git_clone_wiki_test.go index 4bdbc9b7c344..3e10b17d40be 100644 --- a/tests/integration/git_clone_wiki_test.go +++ b/tests/integration/git_clone_wiki_test.go @@ -35,8 +35,7 @@ func TestRepoCloneWiki(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { defer tests.PrepareTestEnv(t)() - dstPath, err := os.MkdirTemp("", "clone_wiki") - assert.NoError(t, err) + dstPath := t.TempDir() r := fmt.Sprintf("%suser2/repo1.wiki.git", u.String()) u, _ = url.Parse(r) diff --git a/tests/integration/git_helper_for_declarative_test.go b/tests/integration/git_helper_for_declarative_test.go index 666f9f6fe946..4f2e540883a0 100644 --- a/tests/integration/git_helper_for_declarative_test.go +++ b/tests/integration/git_helper_for_declarative_test.go @@ -27,11 +27,9 @@ import ( ) func withKeyFile(t *testing.T, keyname string, callback func(string)) { - tmpDir, err := os.MkdirTemp("", "key-file") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() - err = os.Chmod(tmpDir, 0o700) + err := os.Chmod(tmpDir, 0o700) assert.NoError(t, err) keyFile := filepath.Join(tmpDir, keyname) @@ -120,9 +118,7 @@ func doPartialGitClone(dstLocalPath string, u *url.URL) func(*testing.T) { func doGitCloneFail(u *url.URL) func(*testing.T) { return func(t *testing.T) { - tmpDir, err := os.MkdirTemp("", "doGitCloneFail") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() assert.Error(t, git.Clone(git.DefaultContext, u.String(), tmpDir, git.CloneRepoOptions{})) exist, err := util.IsExist(filepath.Join(tmpDir, "README.md")) assert.NoError(t, err) diff --git a/tests/integration/git_test.go b/tests/integration/git_test.go index caeb5db8b3b3..bf5e809dab59 100644 --- a/tests/integration/git_test.go +++ b/tests/integration/git_test.go @@ -27,7 +27,6 @@ import ( "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -57,9 +56,7 @@ func testGit(t *testing.T, u *url.URL) { httpContext.Reponame = "repo-tmp-17" forkedUserCtx.Reponame = httpContext.Reponame - dstPath, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() t.Run("CreateRepoInDifferentUser", doAPICreateRepository(forkedUserCtx, false)) t.Run("AddUserAsCollaborator", doAPIAddCollaborator(forkedUserCtx, httpContext.Username, perm.AccessModeRead)) @@ -71,9 +68,7 @@ func testGit(t *testing.T, u *url.URL) { t.Run("Clone", doGitClone(dstPath, u)) - dstPath2, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath2) + dstPath2 := t.TempDir() t.Run("Partial Clone", doPartialGitClone(dstPath2, u)) @@ -114,9 +109,7 @@ func testGit(t *testing.T, u *url.URL) { sshURL := createSSHUrl(sshContext.GitPath(), u) // Setup clone folder - dstPath, err := os.MkdirTemp("", sshContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() t.Run("Clone", doGitClone(dstPath, sshURL)) @@ -140,9 +133,7 @@ func testGit(t *testing.T, u *url.URL) { } func ensureAnonymousClone(t *testing.T, u *url.URL) { - dstLocalPath, err := os.MkdirTemp("", "repo1") - assert.NoError(t, err) - defer util.RemoveAll(dstLocalPath) + dstLocalPath := t.TempDir() t.Run("CloneAnonymous", doGitClone(dstLocalPath, u)) } @@ -560,9 +551,7 @@ func doPushCreate(ctx APITestContext, u *url.URL) func(t *testing.T) { u.Path = ctx.GitPath() // Create a temporary directory - tmpDir, err := os.MkdirTemp("", ctx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() // Now create local repository to push as our test and set its origin t.Run("InitTestRepository", doGitInitTestRepository(tmpDir)) diff --git a/tests/integration/gpg_git_test.go b/tests/integration/gpg_git_test.go index 2e16d150c8f0..80f484926d3a 100644 --- a/tests/integration/gpg_git_test.go +++ b/tests/integration/gpg_git_test.go @@ -16,7 +16,6 @@ import ( "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" @@ -29,11 +28,9 @@ func TestGPGGit(t *testing.T) { username := "user2" // OK Set a new GPG home - tmpDir, err := os.MkdirTemp("", "temp-gpg") - assert.NoError(t, err) - defer util.RemoveAll(tmpDir) + tmpDir := t.TempDir() - err = os.Chmod(tmpDir, 0o700) + err := os.Chmod(tmpDir, 0o700) assert.NoError(t, err) oldGNUPGHome := os.Getenv("GNUPGHOME") diff --git a/tests/integration/lfs_local_endpoint_test.go b/tests/integration/lfs_local_endpoint_test.go index 88c08c63dbee..4042dc95b351 100644 --- a/tests/integration/lfs_local_endpoint_test.go +++ b/tests/integration/lfs_local_endpoint_test.go @@ -25,15 +25,12 @@ func str2url(raw string) *url.URL { func TestDetermineLocalEndpoint(t *testing.T) { defer tests.PrepareTestEnv(t)() - root, _ := os.MkdirTemp("", "lfs_test") - defer os.RemoveAll(root) + root := t.TempDir() - rootdotgit, _ := os.MkdirTemp("", "lfs_test") - defer os.RemoveAll(rootdotgit) + rootdotgit := t.TempDir() os.Mkdir(filepath.Join(rootdotgit, ".git"), 0o700) - lfsroot, _ := os.MkdirTemp("", "lfs_test") - defer os.RemoveAll(lfsroot) + lfsroot := t.TempDir() // Test cases cases := []struct { diff --git a/tests/integration/migrate_test.go b/tests/integration/migrate_test.go index 0fe401434436..99d5d6c8dd23 100644 --- a/tests/integration/migrate_test.go +++ b/tests/integration/migrate_test.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "os" + "path/filepath" "testing" repo_model "code.gitea.io/gitea/models/repo" @@ -29,16 +30,18 @@ func TestMigrateLocalPath(t *testing.T) { old := setting.ImportLocalPaths setting.ImportLocalPaths = true - lowercasePath, err := os.MkdirTemp("", "lowercase") // may not be lowercase because MkdirTemp creates a random directory name which may be mixedcase + basePath := t.TempDir() + + lowercasePath := filepath.Join(basePath, "lowercase") + err := os.Mkdir(lowercasePath, 0o700) assert.NoError(t, err) - defer os.RemoveAll(lowercasePath) err = migrations.IsMigrateURLAllowed(lowercasePath, adminUser) assert.NoError(t, err, "case lowercase path") - mixedcasePath, err := os.MkdirTemp("", "mIxeDCaSe") + mixedcasePath := filepath.Join(basePath, "mIxeDCaSe") + err = os.Mkdir(mixedcasePath, 0o700) assert.NoError(t, err) - defer os.RemoveAll(mixedcasePath) err = migrations.IsMigrateURLAllowed(mixedcasePath, adminUser) assert.NoError(t, err, "case mixedcase path") diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index a91f1fb2094e..fb08895e212f 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -6,7 +6,6 @@ package integration import ( "net/url" - "os" "testing" "code.gitea.io/gitea/models" @@ -15,7 +14,6 @@ import ( "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/release" "code.gitea.io/gitea/tests" @@ -59,16 +57,14 @@ func TestCreateNewTagProtected(t *testing.T) { username := "user2" httpContext := NewAPITestContext(t, username, "repo1") - dstPath, err := os.MkdirTemp("", httpContext.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() u.Path = httpContext.GitPath() u.User = url.UserPassword(username, userPassword) doGitClone(dstPath, u)(t) - _, _, err = git.NewCommand(git.DefaultContext, "tag", "v-2").RunStdString(&git.RunOpts{Dir: dstPath}) + _, _, err := git.NewCommand(git.DefaultContext, "tag", "v-2").RunStdString(&git.RunOpts{Dir: dstPath}) assert.NoError(t, err) _, _, err = git.NewCommand(git.DefaultContext, "push", "--tags").RunStdString(&git.RunOpts{Dir: dstPath}) diff --git a/tests/integration/ssh_key_test.go b/tests/integration/ssh_key_test.go index 65d9b84404be..fd98af512516 100644 --- a/tests/integration/ssh_key_test.go +++ b/tests/integration/ssh_key_test.go @@ -15,7 +15,6 @@ import ( "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) @@ -61,9 +60,7 @@ func testPushDeployKeyOnEmptyRepo(t *testing.T, u *url.URL) { t.Run("CreatePushDeployKey", doAPICreateDeployKey(ctx, keyname, keyFile, false)) // Setup the testing repository - dstPath, err := os.MkdirTemp("", "repo-tmp-deploy-key-empty-repo-1") - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() t.Run("InitTestRepository", doGitInitTestRepository(dstPath)) @@ -107,9 +104,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { withKeyFile(t, keyname, func(keyFile string) { var userKeyPublicKeyID int64 t.Run("KeyCanOnlyBeUser", func(t *testing.T) { - dstPath, err := os.MkdirTemp("", ctx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() sshURL := createSSHUrl(ctx.GitPath(), u) @@ -133,9 +128,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { }) t.Run("KeyCanBeAnyDeployButNotUserAswell", func(t *testing.T) { - dstPath, err := os.MkdirTemp("", ctx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() sshURL := createSSHUrl(ctx.GitPath(), u) @@ -151,9 +144,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { t.Run("FailToPush", doGitPushTestRepositoryFail(dstPath, "origin", "master")) otherSSHURL := createSSHUrl(otherCtx.GitPath(), u) - dstOtherPath, err := os.MkdirTemp("", otherCtx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstOtherPath) + dstOtherPath := t.TempDir() t.Run("AddWriterDeployKeyToOther", doAPICreateDeployKey(otherCtx, keyname, keyFile, false)) @@ -168,9 +159,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { t.Run("DeleteRepositoryShouldReleaseKey", func(t *testing.T) { otherSSHURL := createSSHUrl(otherCtx.GitPath(), u) - dstOtherPath, err := os.MkdirTemp("", otherCtx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstOtherPath) + dstOtherPath := t.TempDir() t.Run("DeleteRepository", doAPIDeleteRepository(ctx)) @@ -190,9 +179,7 @@ func testKeyOnlyOneType(t *testing.T, u *url.URL) { userKeyPublicKeyID = publicKey.ID })) - dstPath, err := os.MkdirTemp("", ctx.Reponame) - assert.NoError(t, err) - defer util.RemoveAll(dstPath) + dstPath := t.TempDir() sshURL := createSSHUrl(ctx.GitPath(), u) From 3963625b6ef6f4d4f16959466c077593a1f908db Mon Sep 17 00:00:00 2001 From: Aaron F Date: Sun, 4 Sep 2022 21:54:23 +0200 Subject: [PATCH 21/22] Webhook for Wiki changes (#20219) Add support for triggering webhook notifications on wiki changes. This PR contains frontend and backend for webhook notifications on wiki actions (create a new page, rename a page, edit a page and delete a page). The frontend got a new checkbox under the Custom Event -> Repository Events section. There is only one checkbox for create/edit/rename/delete actions, because it makes no sense to separate it and others like releases or packages follow the same schema. ![image](https://user-images.githubusercontent.com/121972/177018803-26851196-831f-4fde-9a4c-9e639b0e0d6b.png) The actions itself are separated, so that different notifications will be executed (with the "action" field). All the webhook receivers implement the new interface method (Wiki) and the corresponding tests. When implementing this, I encounter a little bug on editing a wiki page. Creating and editing a wiki page is technically the same action and will be handled by the ```updateWikiPage``` function. But the function need to know if it is a new wiki page or just a change. This distinction is done by the ```action``` parameter, but this will not be sent by the frontend (on form submit). This PR will fix this by adding the ```action``` parameter with the values ```_new``` or ```_edit```, which will be used by the ```updateWikiPage``` function. I've done integration tests with matrix and gitea (http). ![image](https://user-images.githubusercontent.com/121972/177018795-eb5cdc01-9ba3-483e-a6b7-ed0e313a71fb.png) Fix #16457 Signed-off-by: Aaron Fischer --- models/webhook/hooktask.go | 3 + models/webhook/webhook.go | 8 ++ models/webhook/webhook_test.go | 2 +- modules/notification/base/notifier.go | 3 + modules/notification/base/null.go | 12 +++ modules/notification/notification.go | 21 ++++++ modules/notification/webhook/webhook.go | 38 ++++++++++ modules/structs/hook.go | 33 +++++++++ options/locale/locale_en-US.ini | 2 + routers/api/v1/repo/wiki.go | 5 ++ routers/api/v1/utils/hook.go | 2 + routers/web/repo/webhook.go | 1 + routers/web/repo/wiki.go | 7 ++ services/forms/repo_form.go | 13 ++-- services/webhook/dingtalk.go | 8 ++ services/webhook/dingtalk_test.go | 38 ++++++++++ services/webhook/discord.go | 14 ++++ services/webhook/discord_test.go | 47 ++++++++++++ services/webhook/feishu.go | 7 ++ services/webhook/feishu_test.go | 29 ++++++++ services/webhook/general.go | 29 ++++++++ services/webhook/general_test.go | 54 ++++++++++++++ services/webhook/matrix.go | 7 ++ services/webhook/matrix_test.go | 32 ++++++++ services/webhook/msteams.go | 16 ++++ services/webhook/msteams_test.go | 74 +++++++++++++++++++ services/webhook/packagist.go | 5 ++ services/webhook/packagist_test.go | 20 +++++ services/webhook/payloader.go | 3 + services/webhook/slack.go | 7 ++ services/webhook/slack_test.go | 29 ++++++++ services/webhook/telegram.go | 7 ++ services/webhook/telegram_test.go | 29 ++++++++ services/webhook/wechatwork.go | 7 ++ services/wiki/wiki.go | 2 +- templates/repo/settings/webhook/settings.tmpl | 11 +++ templates/repo/wiki/new.tmpl | 2 +- 37 files changed, 618 insertions(+), 9 deletions(-) diff --git a/models/webhook/hooktask.go b/models/webhook/hooktask.go index 4415518cf001..2adfcaa60dd8 100644 --- a/models/webhook/hooktask.go +++ b/models/webhook/hooktask.go @@ -47,6 +47,7 @@ const ( HookEventPullRequestReviewRejected HookEventType = "pull_request_review_rejected" HookEventPullRequestReviewComment HookEventType = "pull_request_review_comment" HookEventPullRequestSync HookEventType = "pull_request_sync" + HookEventWiki HookEventType = "wiki" HookEventRepository HookEventType = "repository" HookEventRelease HookEventType = "release" HookEventPackage HookEventType = "package" @@ -76,6 +77,8 @@ func (h HookEventType) Event() string { return "pull_request_rejected" case HookEventPullRequestReviewComment: return "pull_request_comment" + case HookEventWiki: + return "wiki" case HookEventRepository: return "repository" case HookEventRelease: diff --git a/models/webhook/webhook.go b/models/webhook/webhook.go index 478a6a29ff23..ac0922063097 100644 --- a/models/webhook/webhook.go +++ b/models/webhook/webhook.go @@ -132,6 +132,7 @@ type HookEvents struct { PullRequestComment bool `json:"pull_request_comment"` PullRequestReview bool `json:"pull_request_review"` PullRequestSync bool `json:"pull_request_sync"` + Wiki bool `json:"wiki"` Repository bool `json:"repository"` Release bool `json:"release"` Package bool `json:"package"` @@ -328,6 +329,12 @@ func (w *Webhook) HasPullRequestSyncEvent() bool { (w.ChooseEvents && w.HookEvents.PullRequestSync) } +// HasWikiEvent returns true if hook enabled wiki event. +func (w *Webhook) HasWikiEvent() bool { + return w.SendEverything || + (w.ChooseEvents && w.HookEvent.Wiki) +} + // HasReleaseEvent returns if hook enabled release event. func (w *Webhook) HasReleaseEvent() bool { return w.SendEverything || @@ -373,6 +380,7 @@ func (w *Webhook) EventCheckers() []struct { {w.HasPullRequestRejectedEvent, HookEventPullRequestReviewRejected}, {w.HasPullRequestCommentEvent, HookEventPullRequestReviewComment}, {w.HasPullRequestSyncEvent, HookEventPullRequestSync}, + {w.HasWikiEvent, HookEventWiki}, {w.HasRepositoryEvent, HookEventRepository}, {w.HasReleaseEvent, HookEventRelease}, {w.HasPackageEvent, HookEventPackage}, diff --git a/models/webhook/webhook_test.go b/models/webhook/webhook_test.go index 1d77ee2a41ad..7ec7edc0b77e 100644 --- a/models/webhook/webhook_test.go +++ b/models/webhook/webhook_test.go @@ -71,7 +71,7 @@ func TestWebhook_EventsArray(t *testing.T) { "issues", "issue_assign", "issue_label", "issue_milestone", "issue_comment", "pull_request", "pull_request_assign", "pull_request_label", "pull_request_milestone", "pull_request_comment", "pull_request_review_approved", "pull_request_review_rejected", - "pull_request_review_comment", "pull_request_sync", "repository", "release", + "pull_request_review_comment", "pull_request_sync", "wiki", "repository", "release", "package", }, (&Webhook{ diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go index 541731ddbf11..d6cec92e19ba 100644 --- a/modules/notification/base/notifier.go +++ b/modules/notification/base/notifier.go @@ -45,6 +45,9 @@ type Notifier interface { issue *issues_model.Issue, comment *issues_model.Comment, mentions []*user_model.User) NotifyUpdateComment(*user_model.User, *issues_model.Comment, string) NotifyDeleteComment(*user_model.User, *issues_model.Comment) + NotifyNewWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) + NotifyEditWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) + NotifyDeleteWikiPage(doer *user_model.User, repo *repo_model.Repository, page string) NotifyNewRelease(rel *repo_model.Release) NotifyUpdateRelease(doer *user_model.User, rel *repo_model.Release) NotifyDeleteRelease(doer *user_model.User, rel *repo_model.Release) diff --git a/modules/notification/base/null.go b/modules/notification/base/null.go index 4f382b3d01ba..b113ae79e1e5 100644 --- a/modules/notification/base/null.go +++ b/modules/notification/base/null.go @@ -78,6 +78,18 @@ func (*NullNotifier) NotifyUpdateComment(doer *user_model.User, c *issues_model. func (*NullNotifier) NotifyDeleteComment(doer *user_model.User, c *issues_model.Comment) { } +// NotifyNewWikiPage places a place holder function +func (*NullNotifier) NotifyNewWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { +} + +// NotifyEditWikiPage places a place holder function +func (*NullNotifier) NotifyEditWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { +} + +// NotifyDeleteWikiPage places a place holder function +func (*NullNotifier) NotifyDeleteWikiPage(doer *user_model.User, repo *repo_model.Repository, page string) { +} + // NotifyNewRelease places a place holder function func (*NullNotifier) NotifyNewRelease(rel *repo_model.Release) { } diff --git a/modules/notification/notification.go b/modules/notification/notification.go index 713cc72aacd3..693c7f5c22f8 100644 --- a/modules/notification/notification.go +++ b/modules/notification/notification.go @@ -40,6 +40,27 @@ func NewContext() { RegisterNotifier(mirror.NewNotifier()) } +// NotifyNewWikiPage notifies creating new wiki pages to notifiers +func NotifyNewWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { + for _, notifier := range notifiers { + notifier.NotifyNewWikiPage(doer, repo, page, comment) + } +} + +// NotifyEditWikiPage notifies editing or renaming wiki pages to notifiers +func NotifyEditWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { + for _, notifier := range notifiers { + notifier.NotifyEditWikiPage(doer, repo, page, comment) + } +} + +// NotifyDeleteWikiPage notifies deleting wiki pages to notifiers +func NotifyDeleteWikiPage(doer *user_model.User, repo *repo_model.Repository, page string) { + for _, notifier := range notifiers { + notifier.NotifyDeleteWikiPage(doer, repo, page) + } +} + // NotifyCreateIssueComment notifies issue comment related message to notifiers func NotifyCreateIssueComment(doer *user_model.User, repo *repo_model.Repository, issue *issues_model.Issue, comment *issues_model.Comment, mentions []*user_model.User, diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go index ed3b53e3e798..0eb2099a206e 100644 --- a/modules/notification/webhook/webhook.go +++ b/modules/notification/webhook/webhook.go @@ -501,6 +501,44 @@ func (m *webhookNotifier) NotifyDeleteComment(doer *user_model.User, comment *is } } +func (m *webhookNotifier) NotifyNewWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { + // Add to hook queue for created wiki page. + if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventWiki, &api.WikiPayload{ + Action: api.HookWikiCreated, + Repository: convert.ToRepo(repo, perm.AccessModeOwner), + Sender: convert.ToUser(doer, nil), + Page: page, + Comment: comment, + }); err != nil { + log.Error("PrepareWebhooks [repo_id: %d]: %v", repo.ID, err) + } +} + +func (m *webhookNotifier) NotifyEditWikiPage(doer *user_model.User, repo *repo_model.Repository, page, comment string) { + // Add to hook queue for edit wiki page. + if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventWiki, &api.WikiPayload{ + Action: api.HookWikiEdited, + Repository: convert.ToRepo(repo, perm.AccessModeOwner), + Sender: convert.ToUser(doer, nil), + Page: page, + Comment: comment, + }); err != nil { + log.Error("PrepareWebhooks [repo_id: %d]: %v", repo.ID, err) + } +} + +func (m *webhookNotifier) NotifyDeleteWikiPage(doer *user_model.User, repo *repo_model.Repository, page string) { + // Add to hook queue for edit wiki page. + if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventWiki, &api.WikiPayload{ + Action: api.HookWikiDeleted, + Repository: convert.ToRepo(repo, perm.AccessModeOwner), + Sender: convert.ToUser(doer, nil), + Page: page, + }); err != nil { + log.Error("PrepareWebhooks [repo_id: %d]: %v", repo.ID, err) + } +} + func (m *webhookNotifier) NotifyIssueChangeLabels(doer *user_model.User, issue *issues_model.Issue, addedLabels, removedLabels []*issues_model.Label, ) { diff --git a/modules/structs/hook.go b/modules/structs/hook.go index 07d51915dea9..132b24b8563c 100644 --- a/modules/structs/hook.go +++ b/modules/structs/hook.go @@ -397,6 +397,39 @@ type ReviewPayload struct { Content string `json:"content"` } +// __ __.__ __ .__ +// / \ / \__| | _|__| +// \ \/\/ / | |/ / | +// \ /| | <| | +// \__/\ / |__|__|_ \__| +// \/ \/ + +// HookWikiAction an action that happens to a wiki page +type HookWikiAction string + +const ( + // HookWikiCreated created + HookWikiCreated HookWikiAction = "created" + // HookWikiEdited edited + HookWikiEdited HookWikiAction = "edited" + // HookWikiDeleted deleted + HookWikiDeleted HookWikiAction = "deleted" +) + +// WikiPayload payload for repository webhooks +type WikiPayload struct { + Action HookWikiAction `json:"action"` + Repository *Repository `json:"repository"` + Sender *User `json:"sender"` + Page string `json:"page"` + Comment string `json:"comment"` +} + +// JSONPayload JSON representation of the payload +func (p *WikiPayload) JSONPayload() ([]byte, error) { + return json.MarshalIndent(p, "", " ") +} + //__________ .__ __ //\______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__. // | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | | diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index ba647771e30f..6845680ccfbd 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1956,6 +1956,8 @@ settings.event_delete = Delete settings.event_delete_desc = Branch or tag deleted. settings.event_fork = Fork settings.event_fork_desc = Repository forked. +settings.event_wiki = Wiki +settings.event_wiki_desc = Wiki page created, renamed, edited or deleted. settings.event_release = Release settings.event_release_desc = Release published, updated or deleted in a repository. settings.event_push = Push diff --git a/routers/api/v1/repo/wiki.go b/routers/api/v1/repo/wiki.go index 82542d1ab854..6d9564854278 100644 --- a/routers/api/v1/repo/wiki.go +++ b/routers/api/v1/repo/wiki.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" @@ -85,6 +86,7 @@ func NewWikiPage(ctx *context.APIContext) { wikiPage := getWikiPage(ctx, wikiName) if !ctx.Written() { + notification.NotifyNewWikiPage(ctx.Doer, ctx.Repo.Repository, wikiName, form.Message) ctx.JSON(http.StatusCreated, wikiPage) } } @@ -152,6 +154,7 @@ func EditWikiPage(ctx *context.APIContext) { wikiPage := getWikiPage(ctx, newWikiName) if !ctx.Written() { + notification.NotifyEditWikiPage(ctx.Doer, ctx.Repo.Repository, newWikiName, form.Message) ctx.JSON(http.StatusOK, wikiPage) } } @@ -242,6 +245,8 @@ func DeleteWikiPage(ctx *context.APIContext) { return } + notification.NotifyDeleteWikiPage(ctx.Doer, ctx.Repo.Repository, wikiName) + ctx.Status(http.StatusNoContent) } diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go index ba008f587c69..7e4dfca9adf2 100644 --- a/routers/api/v1/utils/hook.go +++ b/routers/api/v1/utils/hook.go @@ -126,6 +126,7 @@ func addHook(ctx *context.APIContext, form *api.CreateHookOption, orgID, repoID PullRequestComment: pullHook(form.Events, string(webhook.HookEventPullRequestComment)), PullRequestReview: pullHook(form.Events, "pull_request_review"), PullRequestSync: pullHook(form.Events, string(webhook.HookEventPullRequestSync)), + Wiki: util.IsStringInSlice(string(webhook.HookEventWiki), form.Events, true), Repository: util.IsStringInSlice(string(webhook.HookEventRepository), form.Events, true), Release: util.IsStringInSlice(string(webhook.HookEventRelease), form.Events, true), }, @@ -249,6 +250,7 @@ func editHook(ctx *context.APIContext, form *api.EditHookOption, w *webhook.Webh w.Delete = util.IsStringInSlice(string(webhook.HookEventDelete), form.Events, true) w.Fork = util.IsStringInSlice(string(webhook.HookEventFork), form.Events, true) w.Repository = util.IsStringInSlice(string(webhook.HookEventRepository), form.Events, true) + w.Wiki = util.IsStringInSlice(string(webhook.HookEventWiki), form.Events, true) w.Release = util.IsStringInSlice(string(webhook.HookEventRelease), form.Events, true) w.BranchFilter = form.BranchFilter diff --git a/routers/web/repo/webhook.go b/routers/web/repo/webhook.go index 7e659de0da75..a8939e72bd6e 100644 --- a/routers/web/repo/webhook.go +++ b/routers/web/repo/webhook.go @@ -178,6 +178,7 @@ func ParseHookEvent(form forms.WebhookForm) *webhook.HookEvent { PullRequestComment: form.PullRequestComment, PullRequestReview: form.PullRequestReview, PullRequestSync: form.PullRequestSync, + Wiki: form.Wiki, Repository: form.Repository, Package: form.Package, }, diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go index 0c161568bd04..0f349547cdd2 100644 --- a/routers/web/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -25,6 +25,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" @@ -705,6 +706,8 @@ func NewWikiPost(ctx *context.Context) { return } + notification.NotifyNewWikiPage(ctx.Doer, ctx.Repo.Repository, wikiName, form.Message) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + wiki_service.NameToSubURL(wikiName)) } @@ -747,6 +750,8 @@ func EditWikiPost(ctx *context.Context) { return } + notification.NotifyEditWikiPage(ctx.Doer, ctx.Repo.Repository, newWikiName, form.Message) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + wiki_service.NameToSubURL(newWikiName)) } @@ -762,6 +767,8 @@ func DeleteWikiPagePost(ctx *context.Context) { return } + notification.NotifyDeleteWikiPage(ctx.Doer, ctx.Repo.Repository, wikiName) + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/wiki/", }) diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go index 7a4a2123ebd2..4eb20d297f20 100644 --- a/services/forms/repo_form.go +++ b/services/forms/repo_form.go @@ -215,12 +215,12 @@ func (f *ProtectBranchForm) Validate(req *http.Request, errs binding.Errors) bin return middleware.Validate(errs, ctx.Data, f, ctx.Locale) } -// __ __ ___. .__ .__ __ -// / \ / \ ____\_ |__ | |__ | |__ ____ | | __ -// \ \/\/ // __ \| __ \| | \| | \ / _ \| |/ / -// \ /\ ___/| \_\ \ Y \ Y ( <_> ) < -// \__/\ / \___ >___ /___| /___| /\____/|__|_ \ -// \/ \/ \/ \/ \/ \/ +// __ __ ___. .__ __ +// / \ / \ ____\_ |__ | |__ ____ ____ | | __ +// \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ / +// \ /\ ___/| \_\ \ Y ( <_> | <_> ) < +// \__/\ / \___ >___ /___| /\____/ \____/|__|_ \ +// \/ \/ \/ \/ \/ // WebhookForm form for changing web hook type WebhookForm struct { @@ -242,6 +242,7 @@ type WebhookForm struct { PullRequestComment bool PullRequestReview bool PullRequestSync bool + Wiki bool Repository bool Package bool Active bool diff --git a/services/webhook/dingtalk.go b/services/webhook/dingtalk.go index 06b73c38d649..5112bdb347f4 100644 --- a/services/webhook/dingtalk.go +++ b/services/webhook/dingtalk.go @@ -107,6 +107,14 @@ func (d *DingtalkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { return createDingtalkPayload(issueTitle, text+"\r\n\r\n"+attachmentText, "view issue", p.Issue.HTMLURL), nil } +// Wiki implements PayloadConvertor Wiki method +func (d *DingtalkPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, noneLinkFormatter, true) + url := p.Repository.HTMLURL + "/wiki/" + url.PathEscape(p.Page) + + return createDingtalkPayload(text, text, "view wiki", url), nil +} + // IssueComment implements PayloadConvertor IssueComment method func (d *DingtalkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true) diff --git a/services/webhook/dingtalk_test.go b/services/webhook/dingtalk_test.go index b66b5e43a824..efc9601c1278 100644 --- a/services/webhook/dingtalk_test.go +++ b/services/webhook/dingtalk_test.go @@ -189,6 +189,44 @@ func TestDingTalkPayload(t *testing.T) { assert.Equal(t, "http://localhost:3000/test/repo", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL)) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(DingtalkPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment) by user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment) by user1", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view wiki", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL)) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment) by user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment) by user1", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view wiki", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL)) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' deleted by user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] Wiki page 'index' deleted by user1", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view wiki", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL)) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/discord.go b/services/webhook/discord.go index ae5460b9a7a1..7b6f0f0b1dbf 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -7,6 +7,7 @@ package webhook import ( "errors" "fmt" + "net/url" "strconv" "strings" @@ -235,6 +236,19 @@ func (d *DiscordPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er return d.createPayload(p.Sender, title, "", url, color), nil } +// Wiki implements PayloadConvertor Wiki method +func (d *DiscordPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, color, _ := getWikiPayloadInfo(p, noneLinkFormatter, false) + htmlLink := p.Repository.HTMLURL + "/wiki/" + url.PathEscape(p.Page) + + var description string + if p.Action != api.HookWikiDeleted { + description = p.Comment + } + + return d.createPayload(p.Sender, text, description, htmlLink, color), nil +} + // Release implements PayloadConvertor Release method func (d *DiscordPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, color := getReleasePayloadInfo(p, noneLinkFormatter, false) diff --git a/services/webhook/discord_test.go b/services/webhook/discord_test.go index 8fe20c01024c..8e4e60a7ff05 100644 --- a/services/webhook/discord_test.go +++ b/services/webhook/discord_test.go @@ -212,6 +212,53 @@ func TestDiscordPayload(t *testing.T) { assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(DiscordPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment)", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "Wiki change comment", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment)", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "Wiki change comment", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Wiki page 'index' deleted", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/feishu.go b/services/webhook/feishu.go index 5b20c7dda7e5..782684d0ffb0 100644 --- a/services/webhook/feishu.go +++ b/services/webhook/feishu.go @@ -145,6 +145,13 @@ func (f *FeishuPayload) Repository(p *api.RepositoryPayload) (api.Payloader, err return nil, nil } +// Wiki implements PayloadConvertor Wiki method +func (f *FeishuPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, noneLinkFormatter, true) + + return newFeishuTextPayload(text), nil +} + // Release implements PayloadConvertor Release method func (f *FeishuPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true) diff --git a/services/webhook/feishu_test.go b/services/webhook/feishu_test.go index d862b015e799..85cfb759fe16 100644 --- a/services/webhook/feishu_test.go +++ b/services/webhook/feishu_test.go @@ -145,6 +145,35 @@ func TestFeishuPayload(t *testing.T) { assert.Equal(t, "[test/repo] Repository created", pl.(*FeishuPayload).Content.Text) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(FeishuPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment) by user1", pl.(*FeishuPayload).Content.Text) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment) by user1", pl.(*FeishuPayload).Content.Text) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' deleted by user1", pl.(*FeishuPayload).Content.Text) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/general.go b/services/webhook/general.go index e8006fabaee2..5be177d339da 100644 --- a/services/webhook/general.go +++ b/services/webhook/general.go @@ -161,6 +161,35 @@ func getReleasePayloadInfo(p *api.ReleasePayload, linkFormatter linkFormatter, w return text, color } +func getWikiPayloadInfo(p *api.WikiPayload, linkFormatter linkFormatter, withSender bool) (string, int, string) { + repoLink := linkFormatter(p.Repository.HTMLURL, p.Repository.FullName) + pageLink := linkFormatter(p.Repository.HTMLURL+"/wiki/"+url.PathEscape(p.Page), p.Page) + + var text string + color := greenColor + + switch p.Action { + case api.HookWikiCreated: + text = fmt.Sprintf("[%s] New wiki page '%s'", repoLink, pageLink) + case api.HookWikiEdited: + text = fmt.Sprintf("[%s] Wiki page '%s' edited", repoLink, pageLink) + color = yellowColor + case api.HookWikiDeleted: + text = fmt.Sprintf("[%s] Wiki page '%s' deleted", repoLink, pageLink) + color = redColor + } + + if p.Action != api.HookWikiDeleted && p.Comment != "" { + text += fmt.Sprintf(" (%s)", p.Comment) + } + + if withSender { + text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName)) + } + + return text, color, pageLink +} + func getIssueCommentPayloadInfo(p *api.IssueCommentPayload, linkFormatter linkFormatter, withSender bool) (string, string, int) { repoLink := linkFormatter(p.Repository.HTMLURL, p.Repository.FullName) issueTitle := fmt.Sprintf("#%d %s", p.Issue.Index, p.Issue.Title) diff --git a/services/webhook/general_test.go b/services/webhook/general_test.go index 4d73afe060a6..4acf51ac71d2 100644 --- a/services/webhook/general_test.go +++ b/services/webhook/general_test.go @@ -195,6 +195,22 @@ func pullRequestCommentTestPayload() *api.IssueCommentPayload { } } +func wikiTestPayload() *api.WikiPayload { + return &api.WikiPayload{ + Repository: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + Page: "index", + Comment: "Wiki change comment", + } +} + func pullReleaseTestPayload() *api.ReleasePayload { return &api.ReleasePayload{ Action: api.HookReleasePublished, @@ -469,6 +485,44 @@ func TestGetPullRequestPayloadInfo(t *testing.T) { } } +func TestGetWikiPayloadInfo(t *testing.T) { + p := wikiTestPayload() + + cases := []struct { + action api.HookWikiAction + text string + color int + link string + }{ + { + api.HookWikiCreated, + "[test/repo] New wiki page 'index' (Wiki change comment) by user1", + greenColor, + "index", + }, + { + api.HookWikiEdited, + "[test/repo] Wiki page 'index' edited (Wiki change comment) by user1", + yellowColor, + "index", + }, + { + api.HookWikiDeleted, + "[test/repo] Wiki page 'index' deleted by user1", + redColor, + "index", + }, + } + + for i, c := range cases { + p.Action = c.action + text, color, link := getWikiPayloadInfo(p, noneLinkFormatter, true) + assert.Equal(t, c.text, text, "case %d", i) + assert.Equal(t, c.color, color, "case %d", i) + assert.Equal(t, c.link, link, "case %d", i) + } +} + func TestGetReleasePayloadInfo(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/matrix.go b/services/webhook/matrix.go index a42ab2a93e06..f4c4cf0e9a01 100644 --- a/services/webhook/matrix.go +++ b/services/webhook/matrix.go @@ -143,6 +143,13 @@ func (m *MatrixPayloadUnsafe) IssueComment(p *api.IssueCommentPayload) (api.Payl return getMatrixPayloadUnsafe(text, nil, m.AccessToken, m.MsgType), nil } +// Wiki implements PayloadConvertor Wiki method +func (m *MatrixPayloadUnsafe) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, MatrixLinkFormatter, true) + + return getMatrixPayloadUnsafe(text, nil, m.AccessToken, m.MsgType), nil +} + // Release implements PayloadConvertor Release method func (m *MatrixPayloadUnsafe) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, MatrixLinkFormatter, true) diff --git a/services/webhook/matrix_test.go b/services/webhook/matrix_test.go index 34196aedf04e..4cab845330c3 100644 --- a/services/webhook/matrix_test.go +++ b/services/webhook/matrix_test.go @@ -156,6 +156,38 @@ func TestMatrixPayload(t *testing.T) { assert.Equal(t, `[test/repo] Repository created by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(MatrixPayloadUnsafe) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New wiki page '[index](http://localhost:3000/test/repo/wiki/index)' (Wiki change comment) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' edited (Wiki change comment) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Wiki page '[index](http://localhost:3000/test/repo/wiki/index)' deleted by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go index 59e2e9349398..1406004781b6 100644 --- a/services/webhook/msteams.go +++ b/services/webhook/msteams.go @@ -6,6 +6,7 @@ package webhook import ( "fmt" + "net/url" "strings" webhook_model "code.gitea.io/gitea/models/webhook" @@ -266,6 +267,21 @@ func (m *MSTeamsPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er ), nil } +// Wiki implements PayloadConvertor Wiki method +func (m *MSTeamsPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + title, color, _ := getWikiPayloadInfo(p, noneLinkFormatter, false) + + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + "", + p.Repository.HTMLURL+"/wiki/"+url.PathEscape(p.Page), + color, + &MSTeamsFact{"Repository:", p.Repository.FullName}, + ), nil +} + // Release implements PayloadConvertor Release method func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { title, color := getReleasePayloadInfo(p, noneLinkFormatter, false) diff --git a/services/webhook/msteams_test.go b/services/webhook/msteams_test.go index 3fdf47c1ae8c..8292beed7f81 100644 --- a/services/webhook/msteams_test.go +++ b/services/webhook/msteams_test.go @@ -330,6 +330,80 @@ func TestMSTeamsPayload(t *testing.T) { assert.Equal(t, "http://localhost:3000/test/repo", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(MSTeamsPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment)", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] New wiki page 'index' (Wiki change comment)", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment)", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Wiki page 'index' edited (Wiki change comment)", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Wiki page 'index' deleted", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Wiki page 'index' deleted", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/wiki/index", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/packagist.go b/services/webhook/packagist.go index ace93b13ff05..5badc7462ac2 100644 --- a/services/webhook/packagist.go +++ b/services/webhook/packagist.go @@ -94,6 +94,11 @@ func (f *PackagistPayload) Repository(p *api.RepositoryPayload) (api.Payloader, return nil, nil } +// Wiki implements PayloadConvertor Wiki method +func (f *PackagistPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + return nil, nil +} + // Release implements PayloadConvertor Release method func (f *PackagistPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { return nil, nil diff --git a/services/webhook/packagist_test.go b/services/webhook/packagist_test.go index 08912924d260..4a24b76523c4 100644 --- a/services/webhook/packagist_test.go +++ b/services/webhook/packagist_test.go @@ -116,6 +116,26 @@ func TestPackagistPayload(t *testing.T) { require.Nil(t, pl) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(PackagistPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.Nil(t, pl) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.Nil(t, pl) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.Nil(t, pl) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/payloader.go b/services/webhook/payloader.go index 0e09dd1b1e0d..a9d01c989150 100644 --- a/services/webhook/payloader.go +++ b/services/webhook/payloader.go @@ -22,6 +22,7 @@ type PayloadConvertor interface { Review(*api.PullRequestPayload, webhook_model.HookEventType) (api.Payloader, error) Repository(*api.RepositoryPayload) (api.Payloader, error) Release(*api.ReleasePayload) (api.Payloader, error) + Wiki(*api.WikiPayload) (api.Payloader, error) } func convertPayloader(s PayloadConvertor, p api.Payloader, event webhook_model.HookEventType) (api.Payloader, error) { @@ -51,6 +52,8 @@ func convertPayloader(s PayloadConvertor, p api.Payloader, event webhook_model.H return s.Repository(p.(*api.RepositoryPayload)) case webhook_model.HookEventRelease: return s.Release(p.(*api.ReleasePayload)) + case webhook_model.HookEventWiki: + return s.Wiki(p.(*api.WikiPayload)) } return s, nil } diff --git a/services/webhook/slack.go b/services/webhook/slack.go index e3d0d406de3f..63cc6f8ca248 100644 --- a/services/webhook/slack.go +++ b/services/webhook/slack.go @@ -157,6 +157,13 @@ func (s *SlackPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, }}), nil } +// Wiki implements PayloadConvertor Wiki method +func (s *SlackPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, SlackLinkFormatter, true) + + return s.createPayload(text, nil), nil +} + // Release implements PayloadConvertor Release method func (s *SlackPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, SlackLinkFormatter, true) diff --git a/services/webhook/slack_test.go b/services/webhook/slack_test.go index 0f08785d25e4..3af38b5158c0 100644 --- a/services/webhook/slack_test.go +++ b/services/webhook/slack_test.go @@ -145,6 +145,35 @@ func TestSlackPayload(t *testing.T) { assert.Equal(t, "[] Repository created by ", pl.(*SlackPayload).Text) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(SlackPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] New wiki page '' (Wiki change comment) by ", pl.(*SlackPayload).Text) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Wiki page '' edited (Wiki change comment) by ", pl.(*SlackPayload).Text) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Wiki page '' deleted by ", pl.(*SlackPayload).Text) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/telegram.go b/services/webhook/telegram.go index 64211493ec62..13471d864e55 100644 --- a/services/webhook/telegram.go +++ b/services/webhook/telegram.go @@ -171,6 +171,13 @@ func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e return nil, nil } +// Wiki implements PayloadConvertor Wiki method +func (t *TelegramPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, htmlLinkFormatter, true) + + return createTelegramPayload(text), nil +} + // Release implements PayloadConvertor Release method func (t *TelegramPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, htmlLinkFormatter, true) diff --git a/services/webhook/telegram_test.go b/services/webhook/telegram_test.go index 2f83090166fa..5ca78d050815 100644 --- a/services/webhook/telegram_test.go +++ b/services/webhook/telegram_test.go @@ -145,6 +145,35 @@ func TestTelegramPayload(t *testing.T) { assert.Equal(t, `[test/repo] Repository created`, pl.(*TelegramPayload).Message) }) + t.Run("Wiki", func(t *testing.T) { + p := wikiTestPayload() + + d := new(TelegramPayload) + p.Action = api.HookWikiCreated + pl, err := d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] New wiki page 'index' (Wiki change comment) by user1`, pl.(*TelegramPayload).Message) + + p.Action = api.HookWikiEdited + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] Wiki page 'index' edited (Wiki change comment) by user1`, pl.(*TelegramPayload).Message) + + p.Action = api.HookWikiDeleted + pl, err = d.Wiki(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] Wiki page 'index' deleted by user1`, pl.(*TelegramPayload).Message) + }) + t.Run("Release", func(t *testing.T) { p := pullReleaseTestPayload() diff --git a/services/webhook/wechatwork.go b/services/webhook/wechatwork.go index de8b77706657..bd4c3e085120 100644 --- a/services/webhook/wechatwork.go +++ b/services/webhook/wechatwork.go @@ -166,6 +166,13 @@ func (f *WechatworkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, return nil, nil } +// Wiki implements PayloadConvertor Wiki method +func (f *WechatworkPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) { + text, _, _ := getWikiPayloadInfo(p, noneLinkFormatter, true) + + return newWechatworkMarkdownPayload(text), nil +} + // Release implements PayloadConvertor Release method func (f *WechatworkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true) diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go index ac5283bbebc0..b341b048cc6a 100644 --- a/services/wiki/wiki.go +++ b/services/wiki/wiki.go @@ -118,7 +118,7 @@ func prepareWikiFileName(gitRepo *git.Repository, wikiName string) (bool, string return foundEscaped, escaped, nil } -// updateWikiPage adds a new page to the repository wiki. +// updateWikiPage adds a new page or edits an existing page in repository wiki. func updateWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldWikiName, newWikiName, content, message string, isNew bool) (err error) { if err = nameAllowed(newWikiName); err != nil { return err diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index 98a916dc12b2..57cf8a2f3054 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -98,6 +98,17 @@
+ +
+
+
+ + + {{.i18n.Tr "repo.settings.event_wiki_desc"}} +
+
+
+
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index d3085a1068df..26c19c0a43f0 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -11,7 +11,7 @@
{{end}}
-
+ {{.CsrfTokenHtml}}
From 0232601734fffd13aab3930ebd2b6911eb913315 Mon Sep 17 00:00:00 2001 From: Aaron F Date: Mon, 5 Sep 2022 00:20:46 +0000 Subject: [PATCH 22/22] [skip ci] Updated translations via Crowdin --- options/locale/locale_pt-BR.ini | 9 +++++++++ options/locale/locale_pt-PT.ini | 2 ++ 2 files changed, 11 insertions(+) diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 70f18475e22f..d291e7f1b67c 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -277,6 +277,7 @@ org_no_results=Nenhuma organização correspondente foi encontrada. code_no_results=Nenhum código-fonte correspondente ao seu termo de pesquisa foi encontrado. code_search_results=Resultados da pesquisa por: '%s' code_last_indexed_at=Última indexação %s +relevant_repositories=Apenas repositórios relevantes estão sendo mostrados, mostrar resultados não filtrados. [auth] @@ -1036,6 +1037,7 @@ file_view_rendered=Ver Renderizado file_view_raw=Ver original file_permalink=Link permanente file_too_large=O arquivo é muito grande para ser mostrado. +invisible_runes_header=`Este arquivo contém caracteres Unicode invisíveis!` escape_control_characters=Escapar unescape_control_characters=Desescapar @@ -1056,6 +1058,7 @@ normal_view=Visão normal line=linha lines=linhas +editor.add_file=Adicionar Arquivo editor.new_file=Novo arquivo editor.upload_file=Enviar arquivo editor.edit_file=Editar arquivo @@ -1221,6 +1224,7 @@ issues.new.add_reviewer_title=Solicitar revisão issues.choose.get_started=Primeiros passos issues.choose.blank=Padrão issues.choose.blank_about=Criar uma issue a partir do modelo padrão. +issues.choose.ignore_invalid_templates=Modelos inválidos foram ignorados issues.no_ref=Nenhum branch/tag especificado issues.create=Criar issue issues.new_label=Nova etiqueta @@ -1261,6 +1265,8 @@ issues.filter_milestone=Marco issues.filter_milestone_no_select=Todos os marcos issues.filter_assignee=Atribuído issues.filter_assginee_no_select=Todos os responsáveis +issues.filter_poster=Autor +issues.filter_poster_no_select=Todos os autores issues.filter_type=Tipo issues.filter_type.all_issues=Todas as issues issues.filter_type.assigned_to_you=Atribuídos a você @@ -2771,6 +2777,7 @@ config.skip_tls_verify=Ignorar verificação de TLS config.mailer_config=Configuração de Envio de E-mail config.mailer_enabled=Habilitado +config.mailer_enable_helo=Ativar HELO config.mailer_name=Nome config.mailer_protocol=Protocolo config.mailer_smtp_addr=Addr SMTP @@ -3081,6 +3088,8 @@ npm.dependencies.development=Dependências de Desenvolvimento npm.dependencies.peer=Dependências Peer npm.dependencies.optional=Dependências Opcionais npm.details.tag=Tag +pub.details.repository_site=Site do Repositório +pub.details.documentation_site=Site da Documentação pypi.requires=Requer Python pypi.install=Para instalar o pacote usando pip, execute o seguinte comando: pypi.documentation=Para obter mais informações sobre o registro PyPI, consulte a documentação. diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini index 3346be3be273..611ef8b40e84 100644 --- a/options/locale/locale_pt-PT.ini +++ b/options/locale/locale_pt-PT.ini @@ -1231,6 +1231,8 @@ issues.new.add_reviewer_title=Solicitar revisão issues.choose.get_started=Começar issues.choose.blank=Padrão issues.choose.blank_about=Cria uma questão a partir do modelo padrão. +issues.choose.ignore_invalid_templates=Modelos inválidos foram ignorados +issues.choose.invalid_templates=Foram encontrados %v modelos inválidos issues.no_ref=Sem ramo ou etiqueta especificados issues.create=Criar questão issues.new_label=Novo rótulo