diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0b0436d80..5017f4d32 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -38,7 +38,7 @@ jobs: signoff: false branch: update/changelog title: "${{ github.ref }} Changelog Update" - base: master + base: main body: | Update changelog - Auto-generated by [create-pull-request][1] diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 6e24b7a93..ae9f9b851 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -2,9 +2,9 @@ name: Compiling on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] jobs: # Compile on all supported OSes diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 3c0d85c1c..863582210 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -1,9 +1,9 @@ name: Tutone Generate on: push: - branches: [master] + branches: [main] schedule: - - cron: "5 5 * * 1" + - cron: '5 5 * * 1' jobs: createPullRequest: @@ -26,10 +26,10 @@ jobs: uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.DEV_TOOLKIT_TOKEN }} - commit-message: "chore(tutone): update generated code" + commit-message: 'chore(tutone): update generated code' signoff: false branch: tutone-updates - title: "chore(tutone): update generated code" + title: 'chore(tutone): update generated code' body: | Update generated code using tutone - make generate diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 0e8fe0f4a..e79697278 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -2,19 +2,18 @@ name: Security Scan on: push: - branches: [ master ] + branches: [main] pull_request: - branches: [ master ] + branches: [main] jobs: security: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/golang@master - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - args: --severity-threshold=high - + - uses: actions/checkout@master + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/golang@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + args: --severity-threshold=high diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b40b37c10..349d439d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: Testing on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] jobs: lint: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb2b9a008..b70af6f53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Contributing Contributions are always welcome. Before contributing please read the -[code of conduct](CODE_OF_CONDUCT.md) and [search the issue tracker](../../issues); your issue may have already been discussed or fixed in `master`. To contribute, +[code of conduct](CODE_OF_CONDUCT.md) and [search the issue tracker](../../issues); your issue may have already been discussed or fixed in `main`. To contribute, [fork](https://help.github.com/articles/fork-a-repo/) this repository, commit your changes, and [send a Pull Request](https://help.github.com/articles/using-pull-requests/). Note that our [code of conduct](CODE_OF_CONDUCT.md) applies to all platforms and venues related to this project; please follow it in all your interactions with the project and its participants. @@ -38,4 +38,4 @@ For more information about CLAs, please check out Alex Russell’s excellent pos # Slack -For contributors and maintainers of open source projects hosted by New Relic, we host a public Slack with a channel dedicated to this project. If you are contributing to this project, you're welcome to request access to that community space. +For contributors and maintainers of open source projects hosted by New Relic, we host a public Slack with a channel dedicated to this project. If you are contributing to this project, you're welcome to request access to that community space. diff --git a/README.md b/README.md index b2ec69ae8..5ae9d651d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Security Scan](https://github.com/newrelic/newrelic-client-go/workflows/Security%20Scan/badge.svg)](https://github.com/newrelic/newrelic-client-go/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/newrelic/newrelic-client-go?style=flat-square)](https://goreportcard.com/report/github.com/newrelic/newrelic-client-go) [![GoDoc](https://godoc.org/github.com/newrelic/newrelic-client-go?status.svg)](https://godoc.org/github.com/newrelic/newrelic-client-go) -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/newrelic/newrelic-client-go/blob/master/LICENSE) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/newrelic/newrelic-client-go/blob/main/LICENSE) [![CLA assistant](https://cla-assistant.io/readme/badge/newrelic/newrelic-client-go)](https://cla-assistant.io/newrelic/newrelic-client-go) [![Release](https://img.shields.io/github/release/newrelic/newrelic-client-go/all.svg)](https://github.com/newrelic/newrelic-client-go/releases/latest) @@ -53,10 +53,10 @@ func main() { New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. -* [Roadmap](https://newrelic.github.io/developer-toolkit/roadmap/) - As part of the Developer Toolkit, the roadmap for this project follows the same RFC process -* [Issues or Enhancement Requests](https://github.com/newrelic/newrelic-client-go/issues) - Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue. -* [Contributors Guide](CONTRIBUTING.md) - Contributions are welcome (and if you submit a Enhancement Request, expect to be invited to contribute it yourself :grin:). -* [Community discussion board](https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit) - Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. +- [Roadmap](https://newrelic.github.io/developer-toolkit/roadmap/) - As part of the Developer Toolkit, the roadmap for this project follows the same RFC process +- [Issues or Enhancement Requests](https://github.com/newrelic/newrelic-client-go/issues) - Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue. +- [Contributors Guide](CONTRIBUTING.md) - Contributions are welcome (and if you submit a Enhancement Request, expect to be invited to contribute it yourself :grin:). +- [Community discussion board](https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit) - Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. If you'd like to execute our corporate CLA, or if you have any questions, please drop us an email at opensource@newrelic.com. @@ -64,15 +64,15 @@ Keep in mind that when you submit your pull request, you'll need to sign the CLA ### Requirements -* Go 1.14.0+ -* GNU Make -* git +- Go 1.14.0+ +- GNU Make +- git ### Building -This package does not generate any direct usable assets (it's a library). You can still run the build scripts to validate you code, and generate coverage information. +This package does not generate any direct usable assets (it's a library). You can still run the build scripts to validate you code, and generate coverage information. -``` bash +```bash # Default target is 'build' $ make @@ -89,7 +89,7 @@ Before contributing, all linting and tests must pass. Tests can be run directly via: -``` bash +```bash # Tests and Linting $ make test @@ -108,7 +108,7 @@ need to be configured in the environment or else the integraiton tests will be s during a test run. To run the integration test suite, the following secrets will need to be configured: -``` bash +```bash NEW_RELIC_ACCOUNT_ID NEW_RELIC_API_KEY NEW_RELIC_INSIGHTS_INSERT_KEY @@ -119,16 +119,16 @@ NEW_RELIC_TEST_USER_ID Optional for debugging (defaults to `debug`): -``` bash +```bash NEW_RELIC_LOG_LEVEL=trace ``` #### Go Version Support We'll aim to support the latest supported release of Go, along with the -previous release. This doesn't mean that building with an older version of Go +previous release. This doesn't mean that building with an older version of Go will not work, but we don't intend to support a Go version in this project that -is not supported by the larger Go community. Please see the [Go +is not supported by the larger Go community. Please see the [Go releases][go_releases] page for more details. ### Commit Messages @@ -140,34 +140,34 @@ the [CHANGELOG](CHANGELOG.md): `(): ` -| Type | Description | Change log? | -|------| ----------- | :---------: | -| `chore` | Maintenance type work | No | -| `docs` | Documentation Updates | Yes | -| `feat` | New Features | Yes | -| `fix` | Bug Fixes | Yes | -| `refactor` | Code Refactoring | No | +| Type | Description | Change log? | +| ---------- | --------------------- | :---------: | +| `chore` | Maintenance type work | No | +| `docs` | Documentation Updates | Yes | +| `feat` | New Features | Yes | +| `fix` | Bug Fixes | Yes | +| `refactor` | Code Refactoring | No | #### Scope -This refers to what part of the code is the focus of the work. For example: +This refers to what part of the code is the focus of the work. For example: **General:** -* `build` - Work related to the build system (linting, makefiles, CI/CD, etc) -* `release` - Work related to cutting a new release +- `build` - Work related to the build system (linting, makefiles, CI/CD, etc) +- `release` - Work related to cutting a new release **Package Specific:** -* `newrelic` - Work related to the New Relic package -* `http` - Work related to the `internal/http` package -* `alerts` - Work related to the `pkg/alerts` package +- `newrelic` - Work related to the New Relic package +- `http` - Work related to the `internal/http` package +- `alerts` - Work related to the `pkg/alerts` package ### Documentation **Note:** This requires the repo to be in your GOPATH [(godoc issue)](https://github.com/golang/go/issues/26827) -``` bash +```bash $ make docs ``` diff --git a/scripts/release.sh b/scripts/release.sh index 151e41de8..9944b4e19 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -4,9 +4,9 @@ COLOR_RED='\033[0;31m' COLOR_NONE='\033[0m' CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [ $CURRENT_GIT_BRANCH != 'master' ]; then +if [ $CURRENT_GIT_BRANCH != 'main' ]; then printf "\n" - printf "${COLOR_RED} Error: The release.sh script must be run while on the master branch. \n ${COLOR_NONE}" + printf "${COLOR_RED} Error: The release.sh script must be run while on the main branch. \n ${COLOR_NONE}" printf "\n" exit 1