diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bdc1afa9..18f928ab 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,9 @@ -Fixes # - -## Changes +# Changes Please provide a brief description of the changes here. ## Merge requirement checklist * [ ] Unit tests added/updated -* [ ] [`CHANGELOG.md`](https://github.com/grafana/grafana-opentelemetry-dotnet) file updated for non-trivial changes +* [ ] [`CHANGELOG.md`](https://github.com/grafana/grafana-opentelemetry-dotnet) updated * [ ] Changes in public API reviewed (if applicable) diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 00000000..4613e161 --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..e026190f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,52 @@ +name: lint + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +permissions: {} + +env: + FORCE_COLOR: 3 + TERM: xterm + +jobs: + lint: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + filter: 'tree:0' + persist-credentials: false + show-progress: false + + - name: Add actionlint problem matcher + run: echo "::add-matcher::.github/actionlint-matcher.json" + + - name: Lint workflows + uses: docker://rhysd/actionlint:1.7.7@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9 + with: + args: -color + + - name: Lint markdown + uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0 + with: + config: '.markdownlint.yaml' + globs: | + **/*.md + + - name: Install markdown-link-check + env: + # renovate: datasource=npm depName=markdown-link-check packageName=markdown-link-check + MARKDOWN_LINK_CHECK_VERSION: 3.13.7 + run: sudo npm install -g "markdown-link-check@${MARKDOWN_LINK_CHECK_VERSION}" + + - name: Check markdown links + run: "find . -name '*.md' -print0 | xargs -0 -n1 markdown-link-check --config .markdown_link_check_config.json" diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml deleted file mode 100644 index 6e714f07..00000000 --- a/.github/workflows/markdown-link-check.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: markdown-link-check - -on: - push: - branches: [ 'main*' ] - paths: - - '**.md' - pull_request: - branches: [ 'main*' ] - paths: - - '**.md' - -jobs: - build: - runs-on: ubuntu-latest - permissions: {} - - steps: - - name: check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - persist-credentials: false - - - name: install markdown-link-check - run: sudo npm install -g markdown-link-check - - - name: run markdown-link-check - run: "find . -name '*.md' -print0 | xargs -0 -n1 markdown-link-check --config .markdown_link_check_config.json" diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml deleted file mode 100644 index e1e46d08..00000000 --- a/.github/workflows/markdownlint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: markdownlint - -on: - push: - branches: [ 'main*' ] - paths: - - '**.md' - pull_request: - branches: [ 'main*' ] - paths: - - '**.md' - -jobs: - build: - runs-on: ubuntu-latest - permissions: {} - - steps: - - name: check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - persist-credentials: false - - - name: install markdownlint-cli - run: sudo npm install -g markdownlint-cli - - - name: run markdownlint - run: markdownlint . diff --git a/.github/workflows/misspell.yml b/.github/workflows/misspell.yml deleted file mode 100644 index 6726bf9e..00000000 --- a/.github/workflows/misspell.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: sanitycheck - -on: - push: - branches: [ 'main*' ] - pull_request: - branches: [ 'main*' ] - -jobs: - misspell: - runs-on: ubuntu-latest - permissions: {} - - steps: - - name: check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - persist-credentials: false - - - name: install misspell - run: | - curl -L -o ./install-misspell.sh https://git.io/misspell - sh ./install-misspell.sh - - - name: run misspell - run: ./bin/misspell -error . diff --git a/docs/migration.md b/docs/migration.md index e75440b2..db7f932d 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -32,4 +32,4 @@ export OTEL_RESOURCE_ATTRIBUTES=service.instance.id=,deployment.environm [exporter-readme]: https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md [getting-started]: https://github.com/open-telemetry/opentelemetry-dotnet#getting-started [publish-otlp]: https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/#quickstart-architecture -[resource-attributes]: https://grafana.com/docs/grafana-cloud/monitor-applications/application-observability/instrument/resource-attributes/ +[resource-attributes]: https://grafana.com/docs/grafana-cloud/monitor-applications/application-observability/setup/resource-attributes/