Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:newrelic/docs-website into tabat…
Browse files Browse the repository at this point in the history
…ha/update-secrets-pt2
  • Loading branch information
tabathadelane committed May 23, 2024
2 parents bb6577d + f4ce9ea commit 189fa7c
Show file tree
Hide file tree
Showing 8,119 changed files with 1,679,874 additions and 158,898 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ reviewers:
- akristen
- jeff-colucci
- bradleycamacho
- nbaenam

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/attribute-dictionary-comment.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.
Gatsby Cloud will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 20 to 30 minutes).
We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes).
issuesOpened: |
Hi @{{ author }} 👋
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:
type: choice
options:
- building
- succeeded
- failed
- ready
- error
deployUrl:
description: URL of live branch deploy
required: false
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
END
)
;;
"succeeded")
"ready")
comment_body=$(cat <<-END
### <span aria-hidden="true">✅</span> Deploy Preview ready!
Expand All @@ -60,7 +60,7 @@ jobs:
END
)
;;
"failed")
"error")
comment_body=$(cat <<-END
### <span aria-hidden="true">❌</span> Deploy Preview failed!
Expand Down Expand Up @@ -92,8 +92,8 @@ jobs:
-f context='netlify/build' \
/repos/${{ env.repo }}/statuses/${{ inputs.sha }}
- name: update PR check - failed
if: ${{ inputs.buildStatus == 'failed' }}
- name: update PR check - error
if: ${{ inputs.buildStatus == 'error' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -105,8 +105,8 @@ jobs:
-f context='netlify/build' \
/repos/${{ env.repo }}/statuses/${{ inputs.sha }}
- name: update PR check - succeeded
if: ${{ inputs.buildStatus == 'succeeded' }}
- name: update PR check - ready
if: ${{ inputs.buildStatus == 'ready' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/manual-deploy-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ name: Netlify build manual deploy comment
on:
issue_comment:
types: [created]
pull_request:
types: [opened]

jobs:
deploy-preview:
# when a contributor comments 'netlify build',
# but only on pull requests, not issues.
# or if a contributor opens a PR for the first time.
if: |
(github.event.comment.body == 'netlify build'
&& github.event.issue.pull_request)
|| github.event.action == 'opened'
runs-on: ubuntu-latest

steps:
# we use `jq` to parse the GH API response
- name: setup jq
Expand All @@ -15,13 +25,8 @@ jobs:
- name: send request to Netlify build hook
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# when a contributor comments 'netlify build',
# but only on pull requests, not issues
if: |
contains(github.event.comment.body, 'netlify build')
&& ${{ github.event.issue.pull_request }}
run: |
gh_api_url=$(echo ${{ github.event.issue.pull_request.url }} | sed 's/https:\/\/api.github.com//')
gh_api_url=$(echo ${{ github.event.issue.pull_request.url || github.event.pull_request.url }} | sed 's/https:\/\/api.github.com//')
gh_api_response=$(gh api $gh_api_url)
branch_name=$(echo $gh_api_response | jq -r .head.ref)
sha=$(echo $gh_api_response | jq -r .head.sha)
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/protected-file-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Protected file updates

on:
pull_request:
branches:
- develop

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
deny-protected-file-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Prevent attribute dictionary file change
id: attribute-dictionary
uses: xalvarez/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: .*attribute-dictionary\.json$
trustedAuthors: svc-docs-eng-opensource-bot

- name: Prevent ruby config file change
id: ruby-config
uses: xalvarez/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: .*src/content/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration.mdx
trustedAuthors: newrelic-ruby-agent-bot,kaylareopelle,hannahramadan,tannalynn,fallwith

- name: Comment if JSON file is modified
if: ${{ failure() && steps.attribute-dictionary.outcome == 'failure' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!WARNING]
> `attribute-dictionary.json` is an autogenerated file.
>
> Changes to attribute dictionary should be made through the `attribute-dictionary` repo in GHE.
- name: Comment if ruby config file is modified
if: ${{ failure() && steps.ruby-config.outcome == 'failure' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!WARNING]
> `ruby-agent-configuration.mdx` is an autogenerated file.
>
> To change the Ruby agent configuration file, please submit an issue or open a PR in the [`newrelic/newrelic-ruby-agent`](https://github.com/newrelic/newrelic-ruby-agent) repo.
4 changes: 2 additions & 2 deletions .github/workflows/update-attribute-dictionary-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Update Attribute Dictionary JSON
on:
workflow_dispatch:
schedule:
# 12pm UTC every day (5a PDT)
- cron: '0 12 * * *'
# 12pm UTC (5a PDT) Monday - Friday
- cron: '0 12 * * 1-5'

env:
API_KEY: ${{ secrets.NEW_RELIC_API_KEY }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ yarn-error.log
.devcontainer

src/images/infrastructure_screenshot_full_sonarqube-dashboard.webp

# Local Netlify folder
.netlify
14 changes: 8 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ There are several ways you can contribute:

- If you wish to make documentation edits or add new
documentation, follow our [documentation contribution guidelines](https://docs.newrelic.com/docs/style-guide/writing-guidelines/create-edit-content/#edit-doc).
- If you'd like to to make code contributions, or make content contributions locally, follow the contribution guidelines below.
- If you'd like to make code contributions, or make content contributions locally, follow the contribution guidelines below.

## Getting started

Expand All @@ -63,7 +63,7 @@ The first time you build the site locally, it will take upwards of 20 minutes. T

### Dependencies

Node v16 is used in this project as specified in [.nvmrc](https://github.com/newrelic/developer-website/blob/master/.nvmrc).
Node v18 is used in this project as specified in [.nvmrc](https://github.com/newrelic/developer-website/blob/master/.nvmrc).

### Unit tests

Expand Down Expand Up @@ -105,8 +105,9 @@ If the workflows are enabled and running, you will want to disable them. You can
2. Make your changes.
3. Test your changes! Review the project's [READ ME](README.md) for instructions on how to build and run tests locally.
4. Submit a `Pull Request` to this project with your changes.
5. If/when your `PR` is accepted, the automation in this project will build the site and deploy a new version of the code to `docs.newrelic.com`.
6. And you are done!
5. A preview will start building automatically when a PR is opened. To update the preview after further commits, leave a comment on the PR that says `netlify build`.
6. If/when your `PR` is accepted, the automation in this project will build the site and deploy a new version of the code to `docs.newrelic.com`.
7. And you are done!

### Submitting a PR from a cloned repo

Expand All @@ -116,8 +117,9 @@ If the workflows are enabled and running, you will want to disable them. You can
3. Make your changes.
4. Test your changes! Review the project's [READ ME](README.md) for instructions on how to build and run tests locally.
5. Submit a `Pull Request` to this project with your changes.
6. If/when your `PR` is accepted, the automation in this project will build the site and deploy a new version of the code to `docs.newrelic.com`.
7. And you are done!
6. A preview will start building automatically when a PR is opened. To update the preview after further commits, leave a comment on the PR that says `netlify build`.
7. If/when your `PR` is accepted, the automation in this project will build the site and deploy a new version of the code to `docs.newrelic.com`.
8. And you are done!

### Using the `develop` branch

Expand Down
6 changes: 6 additions & 0 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ const assetPrefix = () => {
if (process.env.BUILD_LANG === 'kr') {
return 'https://docs-website-kr.netlify.app';
}
if (process.env.BUILD_LANG === 'es') {
return 'https://docs-website-es.netlify.app';
}
if (process.env.BUILD_LANG === 'pt') {
return 'https://docs-website-pt.netlify.app';
}
return '';
};

Expand Down
33 changes: 30 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ const rehypeStringify = require('rehype-stringify');
const addAbsoluteImagePath = require('./rehype-plugins/utils/addAbsoluteImagePath');
const { assetPrefix } = require('./env');

const { LOCALES } = require('./scripts/actions/utils/constants');

const siteUrl = 'https://docs.newrelic.com';
const additionalLocales = ['jp', 'kr'];
const allFolders = fs
.readdirSync(`${__dirname}/src/content/docs`)
.filter((folder) => !folder.startsWith('.'));
Expand Down Expand Up @@ -223,6 +224,9 @@ module.exports = {
'./plugins/gatsby-remark-remove-button-paragraphs'
),
},
{
resolve: require.resolve('./plugins/fix-remark-path-prefix-plugin'),
}
],
},
},
Expand Down Expand Up @@ -373,15 +377,15 @@ module.exports = {
},
},
layout: {
contentPadding: '1.5rem',
contentPadding: '5rem',
maxWidth: '1600px',
component: require.resolve('./src/layouts'),
mobileBreakpoint: '760px',
sidebarWidth: '340px',
},
i18n: {
translationsPath: `${__dirname}/src/i18n/translations`,
additionalLocales,
additionalLocales: LOCALES,
},
prism: {
languages: [
Expand Down Expand Up @@ -438,6 +442,7 @@ module.exports = {
'md',
'java',
'razor',
'hcl'
],
},
newrelic: {
Expand All @@ -456,6 +461,28 @@ module.exports = {
: '35094418',
beacon: 'staging-bam-cell.nr-data.net',
errorBeacon: 'staging-bam-cell.nr-data.net',
settings: {
session_replay: {
enabled: true,
block_selector: '',
mask_text_selector: '*',
sampling_rate: 5.0,
error_sampling_rate: 100.0,
mask_all_inputs: true,
collect_fonts: true,
inline_images: false,
inline_stylesheet: true,
mask_input_options: {},
},
distributed_tracing: { enabled: true },
privacy: { cookies_enabled: true },
ajax: {
deny_list: [
'staging-bam-cell.nr-data.net',
'docs.newrelic.com',
],
},
},
},
},
shouldUpdateScroll: {
Expand Down
Loading

0 comments on commit 189fa7c

Please sign in to comment.