Skip to content

Commit

Permalink
fix: update CI and files from new relic -> todogroup
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Jun 25, 2021
1 parent 71fd092 commit 33bb80c
Show file tree
Hide file tree
Showing 26 changed files with 5,122 additions and 8,012 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Issue Report

(A clear and concise description of the issue)

## Expected Behavior

(Write out the expected behavior here.)

## Actual Behavior

(Write out what actually happened here.)

## Steps to Reproduce the Issue

(Write out detailed steps to reproduce the issue here.)
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/enhancement.md

This file was deleted.

97 changes: 10 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: CI
on: [push, pull_request]

env:
THIRD_PARTY_GIT_AUTHOR_EMAIL: [email protected]
THIRD_PARTY_GIT_AUTHOR_NAME: Actionbot

jobs:
job-test-unit:
strategy:
Expand All @@ -19,19 +15,14 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v2
with:
node-version: '12'

- name: Get NPM Cache Directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
node-version: '15'

- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand All @@ -50,10 +41,6 @@ jobs:

- name: Test
run: npm run test

- name: Coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1

job-test-system:
strategy:
Expand Down Expand Up @@ -135,90 +122,26 @@ jobs:
DID_PASS: ${{ steps.repolinter-yaml.outputs.passed }}
shell: bash
run: '[ "$DID_ERROR" = "false" ] && [ "$DID_PASS" = "true" ]'

job-generate-third-party-notices:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: [job-test-unit, job-test-system]
steps:
- name: Checkout repo
uses: actions/checkout@v2

# Probably not necessary since the ubuntu-latest image would have latest Node LTS release
# and nothing in this job _needs_ older Node
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Get NPM Cache Directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci

- name: Install OSS CLI
run: |
sudo npm install -g @newrelic/newrelic-oss-cli
- name: Generate Third Party Notices
run: |
if [ ! -f "third_party_manifest.json" ]; then
echo "::error::third_party_manifest.json is missing. Must generate using the newrelic-oss-cli."
exit 1
fi
# latest commit
LATEST_COMMIT=$(git rev-parse HEAD)
# latest commit where package.json was changed
LAST_CHANGED_COMMIT=$(git log -1 --format=format:%H --full-diff package.json)
if [ $LAST_CHANGED_COMMIT = $LATEST_COMMIT ]; then
git config user.email "${{ env.THIRD_PARTY_GIT_AUTHOR_EMAIL }}"
git config user.name "${{ env.THIRD_PARTY_GIT_AUTHOR_NAME }}"
oss third-party manifest
oss third-party notices
git add third_party_manifest.json
git add THIRD_PARTY_NOTICES.md
git commit -m 'chore: update third-party manifest and notices [skip ci]'
git push origin ${GITHUB_REF#/refs/heads/}
else
echo "No change in package.json, not regenerating third-party notices"
fi

job-generate-release:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: [job-test-unit, job-test-system, job-generate-third-party-notices]
needs: [job-test-unit, job-test-system]
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: main

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12.x

- name: Get NPM Cache Directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
node-version: '15'

- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand Down Expand Up @@ -261,13 +184,13 @@ jobs:
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Gather Docker Labels
if: steps.semantic.outputs.new_release_published == 'true'
id: docker_meta
uses: crazy-max/ghaction-docker-meta@55d3462 #v1.9.1
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}

Expand Down
6 changes: 0 additions & 6 deletions .lgtm.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"changelogFile": "CHANGELOG.md"
}],
["@semantic-release/exec", {
"prepareCmd": "sed -i -E \"s/image:\\s*[\\\"\\']?[^\\\"\\'[:space:]]+[\\\"\\']?/image: docker:\\/\\/ghcr.io\\/newrelic\\/repolinter-action:${nextRelease.gitTag}/\" action.yml"
"prepareCmd": "sed -i -E \"s/image:\\s*[\\\"\\']?[^\\\"\\'[:space:]]+[\\\"\\']?/image: docker:\\/\\/ghcr.io\\/todogroup\\/repolinter-action:${nextRelease.gitTag}/\" action.yml"
}],
["@semantic-release/npm", {
"npmPublish": false
Expand Down
54 changes: 41 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Contributor Covenant Code of Conduct
# RepoLinter Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
Expand All @@ -16,31 +22,53 @@ Examples of behavior that contributes to creating a positive environment include

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[version]: http://contributor-covenant.org/version/1/4/
31 changes: 1 addition & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1 @@
# 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 `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.

## Feature Requests

Feature requests should be submitted in the [Issue tracker](../../issues), with a description of the expected behavior & use case, where they’ll remain closed until sufficient interest, [e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/), has been [shown by the community](../../issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).
Before submitting an Issue, please search for similar ones in the
[closed issues](../../issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).

## Pull Requests

1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
2. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

## Contributor License Agreement

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 [email protected].

For more information about CLAs, please check out Alex Russell’s excellent post,
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).

## Slack

We host a public Slack with a dedicated channel for contributors and maintainers of open source projects hosted by New Relic. If you are contributing to this project, you're welcome to request access to the #oss-contributors channel in the newrelicusers.slack.com workspace. To request access, see https://newrelicusers-signup.herokuapp.com/.
Thank you for contributing! Create a pull request and we will review it to include in the project!
Loading

0 comments on commit 33bb80c

Please sign in to comment.