-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into apm-rework-all-ia
- Loading branch information
Showing
1,420 changed files
with
58,316 additions
and
31,154 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
.github/workflows/manual-add-files-to-translation-queue.yml
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,52 @@ | ||
name: Manually Add Slugs to Translation Queue | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
files: | ||
description: 'String of filenames separated by comma' | ||
required: true | ||
type: string | ||
machineTranslation: | ||
description: 'Send for machine translation' | ||
required: false | ||
type: boolean | ||
locale: | ||
description: 'Define locale' | ||
required: false | ||
type: string | ||
|
||
env: | ||
DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} | ||
HUMAN_TRANSLATION_PROJECT_ID: ${{ secrets.TRANSLATION_VENDOR_PROJECT }} # human project id | ||
MACHINE_TRANSLATION_PROJECT_ID: ${{ secrets.TRANSLATION_VENDOR_MT_PROJECT }} # machine project id | ||
NEW_RELIC_ACCOUNT_ID: ${{ secrets.NEW_RELIC_ACCOUNT_ID }} | ||
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | ||
|
||
jobs: | ||
get-and-save-slugs: | ||
name: Get and Save Slugs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Get slugs and save | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
yarn manual-add-files-to-translate -f ${{ github.event.inputs.files }} -l ${{ github.event.inputs.locale }} -mt ${{ github.event.inputs.machineTranslation }} |
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,80 @@ | ||
name: Add PRs to DocsEng board | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: | ||
- opened | ||
paths-ignore: | ||
- '**.mdx' | ||
- '**.md' | ||
- 'src/nav/*' | ||
- '**/images/*' | ||
|
||
jobs: | ||
track_pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get project data | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} | ||
ORGANIZATION: newrelic | ||
PROJECT_NUMBER: 65 | ||
run: | | ||
gh api graphql -f query=' | ||
query($org: String!, $number: Int!) { | ||
organization(login: $org){ | ||
projectNext(number: $number) { | ||
id | ||
fields(first:20) { | ||
nodes { | ||
id | ||
name | ||
settings | ||
} | ||
} | ||
} | ||
} | ||
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json | ||
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV | ||
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV | ||
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Needs Review") |.id' project_data.json) >> $GITHUB_ENV | ||
- name: Add PR to project | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} | ||
PR_ID: ${{ github.event.pull_request.node_id }} | ||
run: | | ||
item_id="$( gh api graphql -f query=' | ||
mutation($project:ID!, $pr:ID!) { | ||
addProjectNextItem(input: {projectId: $project, contentId: $pr}) { | ||
projectNextItem { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')" | ||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV | ||
- name: Set fields | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }} | ||
run: | | ||
gh api graphql -f query=' | ||
mutation ( | ||
$project: ID! | ||
$item: ID! | ||
$status_field: ID! | ||
$status_value: String! | ||
) { | ||
set_status: updateProjectNextItemField(input: { | ||
projectId: $project | ||
itemId: $item | ||
fieldId: $status_field | ||
value: $status_value | ||
}) { | ||
projectNextItem { | ||
id | ||
} | ||
} | ||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.TODO_OPTION_ID }} --silent | ||
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
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
Oops, something went wrong.