Skip to content

Commit

Permalink
chore: Add Prettier for Yaml formatting
Browse files Browse the repository at this point in the history
Related to #128
- Prettier to fix indenting/quoting across files
- Manually adjust list styles to "-" style
- Ignore all translated files from automated formatting
- Drop redundant CI env variable
  • Loading branch information
nschonni committed Nov 16, 2020
1 parent f84ba23 commit 92740f6
Show file tree
Hide file tree
Showing 46 changed files with 2,154 additions and 1,989 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/60-days-stale-check.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: 60 Days Stale Check
on:
schedule:
- cron: "40 16 * * *" # Run each day at 16:40 UTC / 8:40 PST
- cron: '40 16 * * *' # Run each day at 16:40 UTC / 8:40 PST

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
days-before-stale: 60
days-before-close: -1
only-labels: 'engineering'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-pr-labels: 'never-stale'
exempt-issue-labels: 'never-stale'

- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
days-before-stale: 60
days-before-close: -1
only-labels: 'engineering'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-pr-labels: 'never-stale'
exempt-issue-labels: 'never-stale'
8 changes: 4 additions & 4 deletions .github/workflows/auto-label-prs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Auto label Pull Requests
on:
- pull_request
pull_request:

jobs:
triage:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
8 changes: 4 additions & 4 deletions .github/workflows/automerge-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Auto Merge Dependency Updates
on:
pull_request:
paths:
- "package*.json"
- "Gemfile*"
- "Dockerfile"
- ".github/workflows/**"
- 'package*.json'
- 'Gemfile*'
- 'Dockerfile'
- '.github/workflows/**'
pull_request_review:
types:
- edited
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
steps:
- name: automerge
uses: "pascalgn/automerge-action@c9bd182"
uses: 'pascalgn/automerge-action@c9bd182'
env:
GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}"
MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_METHOD: "merge"
MERGE_FORKS: "true"
MERGE_RETRIES: "50"
MERGE_RETRY_SLEEP: "10000" # ten seconds
UPDATE_LABELS: "automerge,autosquash"
UPDATE_METHOD: "merge"
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
MERGE_COMMIT_MESSAGE: 'pull-request-title'
MERGE_METHOD: 'merge'
MERGE_FORKS: 'true'
MERGE_RETRIES: '50'
MERGE_RETRY_SLEEP: '10000' # ten seconds
UPDATE_LABELS: 'automerge,autosquash'
UPDATE_METHOD: 'merge'
40 changes: 20 additions & 20 deletions .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ name: Check all English links
on:
workflow_dispatch:
schedule:
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST

jobs:
check_all_english_links:
name: Check all links
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: npm ci
run: npm ci
- name: npm run build
run: npm run build
- name: Run script
run: script/check-english-links.js > broken_links.md
- if: ${{ failure() }}
name: Get title for issue
id: check
run: echo "::set-output name=title::$(head -1 broken_links.md)"
- if: ${{ failure() }}
name: Create issue from file
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
with:
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
title: ${{ steps.check.outputs.title }}
content-filepath: ./broken_links.md
labels: broken link report
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: npm ci
run: npm ci
- name: npm run build
run: npm run build
- name: Run script
run: script/check-english-links.js > broken_links.md
- if: ${{ failure() }}
name: Get title for issue
id: check
run: echo "::set-output name=title::$(head -1 broken_links.md)"
- if: ${{ failure() }}
name: Create issue from file
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
with:
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
title: ${{ steps.check.outputs.title }}
content-filepath: ./broken_links.md
labels: broken link report
20 changes: 10 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: "CodeQL analysis"
name: CodeQL analysis

on:
push:
paths:
- '**/*.js'
- '.github/workflows/codeql.yml'
- '**/*.js'
- '.github/workflows/codeql.yml'

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: github/codeql-action/init@v1
with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
- uses: github/codeql-action/analyze@v1
continue-on-error: true
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: github/codeql-action/init@v1
with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp} (not YET ruby, sorry!)
- uses: github/codeql-action/analyze@v1
continue-on-error: true
10 changes: 4 additions & 6 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Crowdin Sync
on:
workflow_dispatch:
schedule:
- cron: "33 2 * * *" # every day at 2:33 UTC at least until automerge is working
- cron: '33 2 * * *' # every day at 2:33 UTC at least until automerge is working

jobs:
sync_with_crowdin:
Expand All @@ -20,7 +20,7 @@ jobs:
upload_translations: false
download_translations: true
create_pull_request: true

# Using a custom config temporarily to avoid clobbering the existing crowdin.yml
# that is used by the github-help-docs OAuth integration.
config: 'crowdin.yml'
Expand All @@ -35,17 +35,15 @@ jobs:
crowdin_branch_name: main

env:
# Using an @octoglot token instead of the default Actions-provided GITHUB_TOKEN here
# Using an @octoglot token instead of the default Actions-provided GITHUB_TOKEN here
# so that subsequent workflows will be able to run on the pull request created by this workflow.
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}

# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string
# See "API v2" on https://crowdin.com/project/<your-project>/settings#api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}

# A personal access token, not to be confused with Crowdin API v1 "API key"
# See https://crowdin.com/settings#api-key to generate a token
# This token was created by logging into Crowdin with the octoglot user
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}


40 changes: 20 additions & 20 deletions .github/workflows/dry-run-sync-algolia-search-indices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ jobs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x
- name: cache node modules
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci
run: npm ci
- name: (Dry run) sync indices
env:
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run sync-search-dry-run
- name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x
- name: cache node modules
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci
run: npm ci
- name: (Dry run) sync indices
env:
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run sync-search-dry-run
Loading

0 comments on commit 92740f6

Please sign in to comment.