-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2eef55e
Showing
70 changed files
with
24,544 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
extends @toptal/browserslist-config |
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,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "toptal/davinci-github-actions" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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,16 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Consistent 2 space indentation | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.ejs.t] | ||
insert_final_newline = false |
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,4 @@ | ||
/dist | ||
/node_modules | ||
/reports | ||
**/dist/** |
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,11 @@ | ||
{ | ||
"extends": "./node_modules/@toptal/davinci-syntax/src/configs/.eslintrc", | ||
"rules": { | ||
"id-length": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "__", "argsIgnorePattern": "^_" }], | ||
"complexity": "off", | ||
"max-lines-per-function": "off", | ||
"padding-line-between-statements": "off" | ||
} | ||
} |
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,10 @@ | ||
# This file defines individuals or teams that are responsible for code. | ||
# | ||
# https://github.com/blog/2392-introducing-code-owners | ||
# https://help.github.com/articles/about-codeowners/ | ||
# | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in the repo. | ||
* @toptal/frontend-experience-eng |
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,14 @@ | ||
[FX-NNNN] | ||
|
||
### Description | ||
|
||
Describe the changes and motivations for the pull request, unless evident from the title. | ||
|
||
### How to test | ||
|
||
- FIXME: Add the steps describing how to verify your changes | ||
|
||
### Review | ||
|
||
- [ ] Ensure that new GH Action have a README.md file | ||
- [ ] Ensure that `yarn documentation:generate` was executed |
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,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 4 | ||
pull-request-branch-name: | ||
separator: "-" | ||
labels: | ||
- no-jira | ||
- dependencies | ||
- github-actions |
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,29 @@ | ||
name: Handle contribution | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, ready_for_review] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
call-notify-jira-about-contribution: | ||
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }} | ||
runs-on: ubuntu-latest | ||
name: Call notify jira about contribution | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: toptal/davinci-github-actions | ||
ref: v2.0.4 | ||
token: ${{ secrets.TOPTAL_DEVBOT_TOKEN }} | ||
path: ./.github/actions/ | ||
|
||
- uses: ./.github/actions/notify-jira-about-contribution | ||
with: | ||
team: frontend-experience-eng | ||
repo: ${{ github.event.repository.name }} | ||
pull-number: ${{ github.event.pull_request.number}} | ||
jira-hook: ${{ secrets.JIRA_AUTOMATION_HOOK_FOR_NEW_CONTRIBUTION }} | ||
github-token: ${{ secrets.TOPTAL_DEVBOT_TOKEN }} | ||
|
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,62 @@ | ||
name: PR Checks | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, ready_for_review, synchronize] | ||
branches: [master] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
readme-existence: | ||
name: "README.md file existence check" | ||
runs-on: [ 'org/toptal', 'os/linux', 'arch/x64', 'size/large' ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Check README.md file existence | ||
run: | | ||
for f in [^node_modules]*/ ; do | ||
if [[ ! -f "$f/README.md" ]] | ||
then | ||
echo "README.md file does not exist in path: $f/README.md" | ||
exit 1 | ||
break | ||
fi | ||
done | ||
unit-tests: | ||
name: Unit Tests | ||
runs-on: [ 'org/toptal', 'os/linux', 'arch/x64', 'size/large' ] | ||
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Setup Node.js 16.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.x | ||
|
||
- uses: ./yarn-install | ||
|
||
- uses: ./unit-tests | ||
|
||
trufflehog-scan: | ||
name: Trufflehog Scan | ||
runs-on: [ 'org/toptal', 'os/linux', 'arch/x64', 'size/large' ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: trufflehog-actions-scan | ||
uses: edplato/[email protected] |
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,94 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/[email protected] | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
# This forces changesets to use git user, provided by GITHUB_TOKEN env var | ||
persist-credentials: false | ||
|
||
- name: Setup node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '14.17' | ||
|
||
- uses: ./yarn-install | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/[email protected] | ||
with: | ||
publish: yarn release | ||
commit: 'chore: version packages' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOPTAL_BUILD_BOT_TOKEN }} | ||
|
||
- name: Add no-jira label to "Version Package" PR | ||
if: ${{ steps.changesets.outputs.published != 'true' }} | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
// Get list of all open PRs with | ||
// head branch "changeset-release/master" | ||
// (there should be max 1 PR with such condition) | ||
const { data } = await github.rest.pulls.list({ | ||
owner: 'toptal', | ||
repo: 'davinci-github-actions', | ||
state: 'open', | ||
head: 'toptal:changeset-release/master' | ||
}) | ||
// add to all of them label "no-jira" | ||
for await (let pr of data) { | ||
github.rest.issues.addLabels({ | ||
owner: 'toptal', | ||
repo: 'davinci-github-actions', | ||
issue_number: pr.number, | ||
labels: [ | ||
'no-jira' | ||
] | ||
}) | ||
} | ||
- name: Send a Slack notification on failure | ||
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '-frontend-exp-team-notifications' | ||
slack-message: ":x: <!here> Current master version of davinci-github-actions is <${{ env.GITHUB_WORKFLOW_URL }}|broken>." | ||
env: | ||
SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }} | ||
|
||
- name: Send a Slack notification on success release | ||
if: ${{ success() && steps.changesets.outputs.published == 'true' }} | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '-frontend-exp-team-notifications' | ||
slack-message: "Current master version of davinci-github-actions successfully released :green_heart:" | ||
env: | ||
SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }} | ||
|
||
- name: Send a Slack notification on success PR merge | ||
if: ${{ success() && steps.changesets.outputs.published != 'true'}} | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '-frontend-exp-team-notifications' | ||
slack-message: "A new PR was merged to davinci-github-actions :parrotspin:" | ||
env: | ||
SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }} |
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,33 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
# IDEs | ||
.idea | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
/dist-package | ||
/reports | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# env | ||
.envrc | ||
|
||
anvil_test_results.json |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
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,3 @@ | ||
module.exports = { | ||
...require('@toptal/davinci-syntax/src/configs/.prettierrc.js') | ||
} |
Oops, something went wrong.