-
Notifications
You must be signed in to change notification settings - Fork 0
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 df1b243
Showing
150 changed files
with
48,390 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,26 @@ | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
Gruntfile.js | ||
docker-compose.local.yml | ||
.releaserc.yml | ||
composer.lock | ||
.nvmrc | ||
package.json | ||
package-lock.json | ||
phpcs.xml | ||
phpunit.xml | ||
README.md | ||
tests | ||
bin | ||
README.md | ||
.github | ||
.eslintrc | ||
assets/js/src | ||
.distignore | ||
node_modules | ||
dist | ||
artifact | ||
.git | ||
composer.json | ||
docs |
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,66 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": "wordpress", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2021, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": [ "node_modules", "assets", "**/*.d.ts" ], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"prefer-destructuring": [ | ||
"warn", | ||
{ | ||
"array": false, | ||
"object": true | ||
}, | ||
{ | ||
"enforceForRenamedProperties": false | ||
} | ||
], | ||
"array-bracket-spacing": [ | ||
"warn", | ||
"always", | ||
{ | ||
"arraysInArrays": false, | ||
"objectsInArrays": false | ||
} | ||
], | ||
"key-spacing": [ | ||
"warn", | ||
{ | ||
"beforeColon": false, | ||
"afterColon": true | ||
} | ||
], | ||
"object-curly-spacing": [ | ||
"warn", | ||
"always", | ||
{ | ||
"arraysInObjects": true, | ||
"objectsInObjects": 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,35 @@ | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
Gruntfile.js export-ignore | ||
docker-compose.local.yml export-ignore | ||
.releaserc.yml export-ignore | ||
composer.lock export-ignore | ||
.nvmrc export-ignore | ||
package.json export-ignore | ||
package-lock.json export-ignore | ||
phpcs.xml export-ignore | ||
phpunit.xml export-ignore | ||
README.md export-ignore | ||
tests export-ignore | ||
bin export-ignore | ||
README.md export-ignore | ||
.github export-ignore | ||
.eslintrc export-ignore | ||
assets/js/src export-ignore | ||
docs export-ignore | ||
.wp-env.override.json export-ignore | ||
postcss.config.js export-ignore | ||
# Set the default behavior for all files. | ||
* text=auto | ||
|
||
# Normalized and converts to | ||
# native line endings on checkout. | ||
*.php text | ||
|
||
# Convert to LF line endings on checkout. | ||
*.sh text eol=lf | ||
|
||
# Binary files. | ||
*.png binary | ||
*.jpg binary |
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,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
create_tag: | ||
runs-on: ubuntu-latest | ||
if: "! contains(github.event.head_commit.message, '[skip ci]')" | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
persist-credentials: false | ||
- name: Build files using ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Release new version | ||
id: release | ||
run: | | ||
npm ci | ||
npm run release | ||
env: | ||
CI: true | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
GIT_AUTHOR_NAME: themeisle[bot] | ||
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }} | ||
GIT_COMMITTER_NAME: themeisle[bot] | ||
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }} | ||
empty-job: | ||
# if no jobs run, github action considers it a test failure -- which seems like a bug | ||
# this makes it so the top-level if statement for the job does not give status failure. | ||
runs-on: ubuntu-latest | ||
if: success() | ||
steps: | ||
- name: Meep | ||
run: | | ||
echo "Nothing to do" |
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,50 @@ | ||
name: Test e2e | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, ready_for_review] | ||
branches-ignore: | ||
- "update_dependencies" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
e2e: | ||
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name | ||
name: Playwright E2E tests | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Setup PHP version | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "7.4" | ||
extensions: simplexml | ||
- name: Check out source files | ||
uses: actions/checkout@v4 | ||
- name: Install composer deps | ||
run: composer install --no-dev --prefer-dist --no-progress --no-suggest | ||
- name: Install npm deps | ||
run: | | ||
npm ci | ||
npm install -g playwright-cli | ||
npx playwright install --with-deps chromium | ||
- name: Install environment | ||
run: | | ||
cp ./bin/themeisle-sdk.php ./ | ||
npm run wp-env start | ||
- name: Run the tests | ||
run: | | ||
npm run test:e2e:playwright | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
- name: Archive test results | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: e2e-playwright-results | ||
path: artifacts | ||
retention-days: 1 | ||
if-no-files-found: 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,35 @@ | ||
name: Mirror Main Branch and Tags | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
mirror: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Push main branch and tags to mirror repo | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }} | ||
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }} | ||
run: | | ||
git remote add mirror "https://${{ secrets.BOT_TOKEN }}@github.com/Codeinwp/themeisle-sdk-lib" | ||
# Reset to a single commit with no history | ||
git config --global user.email ${{ secrets.BOT_EMAIL }} | ||
git config --global user.name "pirate-bot" | ||
git checkout master | ||
git reset --soft $(git rev-list --max-parents=0 HEAD) # Go to the first commit, keeping changes | ||
git commit --amend -m "new changes" # Create a single commit | ||
# Push to the mirror repo, overwriting history | ||
git push mirror master --force # Push only the master branch with new history | ||
git push mirror --tags --force |
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,42 @@ | ||
name: Add to project | ||
|
||
on: | ||
issues: | ||
types: [opened,transferred] | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/add-to-project@main | ||
id: add_project | ||
with: | ||
project-url: ${{ secrets.PROJECT_PLANNING }} | ||
github-token: ${{ secrets.BOT_TOKEN_PROJECT }} | ||
- name: Set Team | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_PROJECT }} | ||
run: | | ||
gh api graphql -f query=' | ||
mutation( | ||
$project: ID! | ||
$item: ID! | ||
$status_field: ID! | ||
$status_value: String! | ||
) { | ||
updateProjectV2ItemFieldValue( | ||
input: { | ||
projectId: $project | ||
itemId: $item | ||
fieldId: $status_field | ||
value: { | ||
singleSelectOptionId: $status_value | ||
} | ||
} | ||
) { | ||
projectV2Item { | ||
id | ||
} | ||
} | ||
}' -f project=${{ secrets.PROJECT_PLANNING_ID }} -f item=${{ steps.add_project.outputs.itemId }} -f status_field=${{ secrets.PLANNING_TEAM_FIELD_ID }} -f status_value=34196c74 --silent |
Oops, something went wrong.