-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/csuzhang_add_contributing.md
- Loading branch information
Showing
129 changed files
with
3,618 additions
and
1,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. crosslink) | ||
component: | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: | ||
|
||
# One or more tracking issues related to the change | ||
issues: [] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. crosslink) | ||
component: chloggen | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Disallow whitespace-only values | ||
|
||
# One or more tracking issues related to the change | ||
issues: [164] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# This action requires that any PR targeting the main branch should add a | ||
# yaml file to the ./.chloggen/ directory. If a CHANGELOG entry is not required, | ||
# or if performing maintance on the Changelog, add either \"[chore]\" to the title of | ||
# the pull request or add the \"Skip Changelog\" label to disable this action. | ||
|
||
name: changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}} | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
- name: Cache Go | ||
id: go-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/bin | ||
~/go/pkg/mod | ||
key: changelog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Ensure no changes to the CHANGELOG | ||
run: | | ||
if [[ $(git diff --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./CHANGELOG.md) ]] | ||
then | ||
echo "The CHANGELOG should not be directly modified." | ||
echo "Please add a .yaml file to the ./.chloggen/ directory." | ||
echo "Run make chlog-new to add a new changelog file." | ||
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." | ||
false | ||
else | ||
echo "The CHANGELOG was not modified." | ||
fi | ||
- name: Ensure ./.chloggen/*.yaml addition(s) | ||
run: | | ||
if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./.chloggen | grep -c \\.yaml) ]] | ||
then | ||
echo "No changelog entry was added to the ./.chloggen/ directory." | ||
echo "Please add a .yaml file to the ./.chloggen/ directory." | ||
echo "Run make chlog-new to add a new changelog file." | ||
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." | ||
false | ||
else | ||
echo "A changelog entry was added to the ./.chloggen/ directory." | ||
fi | ||
- name: Validate ./.chloggen/*.yaml changes | ||
run: | | ||
make chlog-validate \ | ||
|| { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; } | ||
# In order to validate any links in the yaml file, render the config to markdown | ||
- name: Render .chloggen changelog entries | ||
run: make chlog-preview > changelog_preview.md | ||
- name: Install markdown-link-check | ||
run: npm install -g markdown-link-check | ||
- name: Run markdown-link-check | ||
run: | | ||
markdown-link-check \ | ||
--verbose \ | ||
--config .github/workflows/check_links_config.json \ | ||
changelog_preview.md \ | ||
|| { echo "Check that anchor links are lowercase"; exit 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "http(s)?://\\d+\\.\\d+\\.\\d+\\.\\d+" | ||
}, | ||
{ | ||
"pattern": "http(s)?://localhost" | ||
}, | ||
{ | ||
"pattern": "http(s)?://example.com" | ||
}, | ||
{ | ||
"pattern": "^#" | ||
} | ||
], | ||
"aliveStatusCodes": [429, 200] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,13 @@ env: | |
# Path to where test results will be saved. | ||
TEST_RESULTS: /tmp/test-results | ||
# Default minimum version of Go to support. | ||
DEFAULT_GO_VERSION: 1.18 | ||
DEFAULT_GO_VERSION: 1.19 | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.DEFAULT_GO_VERSION }} | ||
- name: Checkout Repo | ||
|
@@ -48,7 +48,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.DEFAULT_GO_VERSION }} | ||
- name: Checkout Repo | ||
|
@@ -71,7 +71,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.DEFAULT_GO_VERSION }} | ||
- name: Checkout Repo | ||
|
@@ -95,7 +95,7 @@ jobs: | |
cp coverage.txt $TEST_RESULTS | ||
cp coverage.html $TEST_RESULTS | ||
- name: Upload coverage report | ||
uses: codecov/[email protected].0 | ||
uses: codecov/[email protected].4 | ||
with: | ||
file: ./coverage.txt | ||
fail_ci_if_error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Automation - Dependabot PR | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install zsh | ||
run: sudo apt-get update; sudo apt-get install zsh | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Run dependabot-pr.sh | ||
run: ./.github/workflows/scripts/dependabot-pr.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/zsh -ex | ||
|
||
# Copyright The OpenTelemetry Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
git config user.name opentelemetrybot | ||
git config user.email [email protected] | ||
|
||
PR_NAME=dependabot-prs/`date +'%Y-%m-%dT%H%M%S'` | ||
git checkout -b $PR_NAME | ||
|
||
IFS=$'\n' | ||
requests=($( gh pr list --search "author:app/dependabot" --json title --jq '.[].title' )) | ||
message="" | ||
dirs=(`find . -type f -name "go.mod" -exec dirname {} \; | sort | egrep '^./'`) | ||
|
||
declare -A mods | ||
|
||
for line in $requests; do | ||
echo $line | ||
if [[ $line != Bump* ]]; then | ||
continue | ||
fi | ||
|
||
module=$(echo $line | cut -f 2 -d " ") | ||
version=$(echo $line | cut -f 6 -d " ") | ||
|
||
mods[$module]=$version | ||
message+=$line | ||
message+=$'\n' | ||
done | ||
|
||
for module version in ${(kv)mods}; do | ||
topdir=`pwd` | ||
for dir in $dirs; do | ||
echo "checking $dir" | ||
cd $dir && if grep -q "$module " go.mod; then go get "$module"@v"$version"; fi | ||
cd $topdir | ||
done | ||
done | ||
|
||
make tidy lint build | ||
|
||
git add go.sum go.mod | ||
git add "**/go.sum" "**/go.mod" | ||
git commit -m "dependabot updates `date` | ||
$message" | ||
git push origin $PR_NAME | ||
|
||
gh pr create --title "[chore] dependabot updates `date`" --body "$message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Default state for all rules | ||
default: true | ||
|
||
# Configure long lines for tables and code blocks | ||
MD013: | ||
code_blocks: false | ||
tables: false |
Oops, something went wrong.