Skip to content

Commit

Permalink
Initial open source commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesw6811 committed Aug 29, 2023
0 parents commit bacac9f
Show file tree
Hide file tree
Showing 6,852 changed files with 161,570 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Default config for the open source checks in tools/checks
# Create a file named .env in the same directory to override these defaults
BASE_BRANCH='origin/main'
COMMIT_HASH=''
DEBUG=false
FILES='changed'
ONLY_REQUIRED_CHECKS=false
POST_PULL_REQUEST_COMMENTS=false
PULL_REQUEST_NUMBER=0
REPOSITORY=''
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
content/de-de/assets/** filter=lfs diff=lfs merge=lfs -text
content/en-us/assets/** filter=lfs diff=lfs merge=lfs -text
content/es-es/assets/** filter=lfs diff=lfs merge=lfs -text
content/fr-fr/assets/** filter=lfs diff=lfs merge=lfs -text
content/ja-jp/assets/** filter=lfs diff=lfs merge=lfs -text
content/ko-kr/assets/** filter=lfs diff=lfs merge=lfs -text
content/pt-br/assets/** filter=lfs diff=lfs merge=lfs -text
content/ru-ru/assets/** filter=lfs diff=lfs merge=lfs -text
content/zh-cn/assets/** filter=lfs diff=lfs merge=lfs -text
content/zh-tw/assets/** filter=lfs diff=lfs merge=lfs -text

# Git will always convert line endings to LF on checkout
* text eol=lf
40 changes: 40 additions & 0 deletions .github/actions/quality-checks/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Quality Checks
description: Reusable action for running the quality checks
inputs:
BASE_BRANCH:
description: Base branch
COMMIT_HASH:
description: Commit hash
EVENT_NAME:
description: Github event name
GITHUB_PAT:
description: Github token
PULL_REQUEST_NUMBER:
description: Pull request number

runs:
using: 'composite'
steps:
- name: Run quality checks
shell: bash
run: |
echo "Base branch: ${{ inputs.BASE_BRANCH }}"
echo "Commit hash: ${{ inputs.COMMIT_HASH }}"
echo "GitHub event name: ${{ inputs.EVENT_NAME }}"
echo "Pull request number: ${{ inputs.PULL_REQUEST_NUMBER }}"
if [ "${{ inputs.EVENT_NAME }}" = "pull_request" ] || [ "${{ inputs.EVENT_NAME }}" = "pull_request_target" ]; then
npm run check -- --files='changed' --postPullRequestComments=true
elif [ "${{ inputs.EVENT_NAME }}" = "push" ]; then
npm run check -- --files='last-commit' --postPullRequestComments=false
elif [ "${{ inputs.EVENT_NAME }}" = "workflow_dispatch" ]; then
npm run check -- --files='all' --postPullRequestComments=false
else
echo "Unknown GitHub event name: ${{ inputs.EVENT_NAME }}"
exit 1
fi
env:
GITHUB_PAT: ${{ inputs.GITHUB_PAT }}
BASE_BRANCH: ${{ inputs.BASE_BRANCH }}
COMMIT_HASH: ${{ inputs.COMMIT_HASH }}
PULL_REQUEST_NUMBER: ${{ inputs.PULL_REQUEST_NUMBER }}
72 changes: 72 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# https://github.com/actions/labeler
### Tools ###

# Add 'tools' label to any file change not in content dir
tools:
- '!content/**/*'

# Add extra label for .github folder for extra visibility
github:
- '.github/**/*'

### Content ###

art:
- 'content/en-us/art/**/*'
- 'content/common/navigation/engine/art.yaml'

assets:
- 'content/en-us/assets/**/*'

education:
- 'content/en-us/education/**/*'
- 'content/en-us/assets/education/**/*'
- 'content/common/navigation/education.yaml'

design:
- 'content/en-us/production/game-design/**/*'
- 'content/common/navigation/engine/design.yaml'

# Add 'engine guides' label to any .md change not in any other category
# Need to use `any` syntax for excluding subfolders
engine guides:
- any:
[
'content/en-us/**/*.md',
'content/common/navigation/engine/guides.yaml',
'!content/en-us/art/**/*',
'!content/en-us/assets/**/*',
'!content/en-us/cloud/**/*',
'!content/en-us/education/**/*',
'!content/en-us/production/game-design/**/*',
'!content/en-us/reference/**/*',
'!content/en-us/resources/**/*',
'!content/en-us/studio/**/*',
'!content/en-us/tutorials/**/*',
]

engine reference:
- 'content/en-us/reference/**/*.yaml'

navigation:
- 'content/common/navigation/**/*'

cloud:
- 'content/en-us/cloud/**/*'
- 'content/en-us/assets/open-cloud/**/*'
- 'content/en-us/reference/cloud/**/*'
- 'content/common/navigation/cloud/**/*'

resources:
- 'content/en-us/resources/**/*'
- 'content/common/navigation/engine/resources.yaml'

studio:
- 'content/en-us/studio/**/*'
- 'content/en-us/assets/studio/**/*'
- 'content/common/navigation/engine/studio.yaml'

tutorials:
- 'content/en-us/tutorials/**/*'
- 'content/en-us/assets/tutorials/**/*'
- 'content/common/navigation/engine/tutorials.yaml'
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Changes

<!-- Please summarize your changes. -->

<!-- Please link to any applicable information (forum posts, bug reports, etc.). -->

## Checks

By submitting your pull request for review, you agree to the following:

- [ ] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses.
- [ ] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses.
- [ ] To the best of my knowledge, all proposed changes are accurate.
59 changes: 59 additions & 0 deletions .github/workflows/content-checks-development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Content Checks (Development)
on:
# Use pull_request for development, pull_request_target for forks
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
push:
branches:
- main
- staging
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
concurrency:
group: content-checks-development-${{ github.event_name }}-${{ github.event.pull_request.number }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
quality:
name: Quality Checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.15.0

- name: Install Node.js dependencies
shell: bash
run: npm ci

- name: Print workflow information
run: |
echo "Event name: ${{ github.event_name }}"
echo "Pull request number: ${{ github.event.pull_request.number }}"
echo "Pull request user login: ${{ github.event.pull_request.user.login }}"
echo "Base ref: ${{ github.event.pull_request.base.ref }}"
echo "Head sha: ${{ github.event.pull_request.head.sha }}"
git status
git remote -v
git log --oneline -n 10
- name: Run quality checks
uses: ./.github/actions/quality-checks
with:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: origin/${{ github.event.pull_request.base.ref }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
78 changes: 78 additions & 0 deletions .github/workflows/content-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Content Checks
on:
pull_request_target:
types:
- opened
- synchronize
- ready_for_review
- reopened
push:
branches:
- main
- staging
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
concurrency:
group: content-checks-${{ github.event_name }}-${{ github.event.pull_request.number }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}
jobs:
quality:
name: Quality Checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Sparse checkout of content directory from fork to temp directory
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: 'temp_content'
sparse-checkout: 'content/'
sparse-checkout-cone-mode: false
fetch-depth: 1

- name: Move the content from temp directory to main repo's content directory
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -rf content/
ls -la temp_content/content/
mv temp_content/content/ content/
ls -la temp_content/
rm -rf temp_content/
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.15.0

- name: Install Node.js dependencies
shell: bash
run: npm ci

- name: Print workflow information
run: |
echo "Event name: ${{ github.event_name }}"
echo "Pull request number: ${{ github.event.pull_request.number }}"
echo "Pull request user login: ${{ github.event.pull_request.user.login }}"
echo "Base ref: ${{ github.event.pull_request.base.ref }}"
echo "Head sha: ${{ github.event.pull_request.head.sha }}"
git status
git remote -v
git log --oneline -n 10
- name: Run quality checks
# Don't run local code for security reasons
uses: Roblox/creator-docs/.github/actions/quality-checks@main
with:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: origin/${{ github.event.pull_request.base.ref }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
EVENT_NAME: ${{ github.event_name }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
36 changes: 36 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Stale'
on:
schedule:
# 8 is Midnight Pacific Standard Time
# Run again in 1 hour to get all PRs
# 20 is Noon Pacific Standard Time
- cron: '0 8,9,20 * * *' # https://crontab.guru/#0_8,9,20_*_*_*
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

jobs:
stale:
name: 'Close Stale Pull Requests'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8 # https://github.com/actions/stale
with:
# Don't do anything to issues
days-before-issue-stale: -1
days-before-issue-close: -1
# Pull Requests
stale-pr-message: >-
This pull request has been inactive for 14 days. If it remains
inactive for another 7 days, it will close. Please
update or comment on this pull request to keep it open. 🙏
close-pr-message: >-
This pull request has been inactive for 21 days. It's closing now.
Please feel free to reopen it if you still need it. 🙏
stale-pr-label: 'stale'
days-before-pr-stale: 14
days-before-pr-close: 7
delete-branch: true
# GitHub Actions has a rate limit of 1,000 operations per hour
# See https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions
operations-per-run: 500
# For debugging
debug-only: false
52 changes: 52 additions & 0 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Triage
on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
# All event types
# Be careful when adding more actions to this workflow
# https://github.com/actions/labeler#permissions
pull_request_target:
types:
[
assigned,
unassigned,
labeled,
unlabeled,
opened,
edited,
closed,
reopened,
synchronize,
converted_to_draft,
ready_for_review,
locked,
unlocked,
review_requested,
review_request_removed,
auto_merge_enabled,
auto_merge_disabled,
]

jobs:
label-pull-request:
name: 'Label Pull Request'
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4 # https://github.com/actions/labeler
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
dot: true
first-interaction:
name: First Interaction
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1 # https://github.com/actions/first-interaction
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: "Hi @${{ github.event.pull_request.user.login }}, thanks so much for helping improve the Roblox creator documentation! Our technical writing team will review your pull request soon. In the meantime, please ensure you've read through the [README.md](https://github.com/Roblox/creator-docs#readme), contribution guidelines, and [style recommendations](https://github.com/Roblox/creator-docs/blob/main/STYLE.md)."
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules/
.DS_Store
.env
tools/output/
3 changes: 3 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; }
git lfs post-checkout "$@"
3 changes: 3 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; }
git lfs post-commit "$@"
3 changes: 3 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; }
git lfs post-merge "$@"
Loading

0 comments on commit bacac9f

Please sign in to comment.