diff --git a/.github/ISSUE_TEMPLATE/download-or-update-issue.md b/.github/ISSUE_TEMPLATE/download-or-update-issue.md index c6bf66d..3c75c29 100644 --- a/.github/ISSUE_TEMPLATE/download-or-update-issue.md +++ b/.github/ISSUE_TEMPLATE/download-or-update-issue.md @@ -7,10 +7,16 @@ assignees: '' --- -**What project were you trying to use? (e.g. Blender, Arch Linux, Gentoo):** +**What project were you trying to use?:** -**What failed? (e.g. ISO download failed, `apt upgrade` failed, project is out of sync, Blender download failed):** +ie. Arch Linux, Blender, Gentoo -**When did you first experience the issue:** +**What failed?:** -**Please provide any other information:** +ie. ISO download failed, `apt upgrade` failed, project is out of sync + +**Are you an official project maintainer?:** + +Yes/No + +Feel free to add any other details you think are relevant! diff --git a/.github/ISSUE_TEMPLATE/mirror-request.md b/.github/ISSUE_TEMPLATE/mirror-request.md index 69ebf2a..dafe362 100644 --- a/.github/ISSUE_TEMPLATE/mirror-request.md +++ b/.github/ISSUE_TEMPLATE/mirror-request.md @@ -7,10 +7,22 @@ assignees: '' --- -## Include full project name, a short name, and the home page url +## Include full project name -## Are you an official maintainer of this project? How would we become an "Official" mirror +ie. Arch Linux, Blender, Gentoo -## Is there a link to documentation on how to mirror the project +## A short name url friendly name -## (Optional) Around how much disk space is required to host the project +ie. archlinux, blender, gentoo + +## The project's website + +ie. , , + +## Please provide some information on how to mirror the project + +Either link to documentation + +## Are you an official maintainer of this project? + +Yes/No diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e0871f9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 9c8454b..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '24 16 * * 1' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'go', 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7f7e988..bdeeb73 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,25 +1,72 @@ -name: Go +name: checks on: push: - branches: [ master ] + branches: [ "main" ] pull_request: - branches: [ master ] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version: '1.21' - name: Build run: go build -v ./... + typos: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + + - name: Check spelling of all files + uses: crate-ci/typos@master + + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check code formatting using gofmt + uses: Jerome1337/gofmt-action@v1.0.5 + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Verify modfile + run: go mod verify + + - name: Vet + run: go vet ./... + + - name: Install golint + run: go install golang.org/x/lint/golint@latest + + - name: Lint + run: golint -set_exit_status ./... + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Test - run: go test -v ./... + run: go test -v ./... \ No newline at end of file diff --git a/tracking.go b/tracking.go index e5293d7..5f79a94 100644 --- a/tracking.go +++ b/tracking.go @@ -282,7 +282,7 @@ func Sendstatistics() { }, t) writer.WritePoint(p) - // To be safe we release the lock before logging because logging takes a seperate lock + // To be safe we release the lock before logging because logging takes a separate lock statistics.RUnlock() logging.Info("Sent statistics")