Skip to content

Commit df1b243

Browse files
selulpirate-bot
authored andcommitted
new changes
0 parents  commit df1b243

File tree

150 files changed

+48390
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+48390
-0
lines changed

.distignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.gitattributes
2+
.gitignore
3+
.travis.yml
4+
Gruntfile.js
5+
docker-compose.local.yml
6+
.releaserc.yml
7+
composer.lock
8+
.nvmrc
9+
package.json
10+
package-lock.json
11+
phpcs.xml
12+
phpunit.xml
13+
README.md
14+
tests
15+
bin
16+
README.md
17+
.github
18+
.eslintrc
19+
assets/js/src
20+
.distignore
21+
node_modules
22+
dist
23+
artifact
24+
.git
25+
composer.json
26+
docs

.eslintrc

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "wordpress",
7+
"parserOptions": {
8+
"ecmaFeatures": {
9+
"jsx": true
10+
},
11+
"ecmaVersion": 2021,
12+
"sourceType": "module"
13+
},
14+
"ignorePatterns": [ "node_modules", "assets", "**/*.d.ts" ],
15+
"rules": {
16+
"indent": [
17+
"error",
18+
"tab"
19+
],
20+
"linebreak-style": [
21+
"error",
22+
"unix"
23+
],
24+
"quotes": [
25+
"error",
26+
"single"
27+
],
28+
"semi": [
29+
"error",
30+
"always"
31+
],
32+
"prefer-destructuring": [
33+
"warn",
34+
{
35+
"array": false,
36+
"object": true
37+
},
38+
{
39+
"enforceForRenamedProperties": false
40+
}
41+
],
42+
"array-bracket-spacing": [
43+
"warn",
44+
"always",
45+
{
46+
"arraysInArrays": false,
47+
"objectsInArrays": false
48+
}
49+
],
50+
"key-spacing": [
51+
"warn",
52+
{
53+
"beforeColon": false,
54+
"afterColon": true
55+
}
56+
],
57+
"object-curly-spacing": [
58+
"warn",
59+
"always",
60+
{
61+
"arraysInObjects": true,
62+
"objectsInObjects": false
63+
}
64+
],
65+
}
66+
}

.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore
3+
.travis.yml export-ignore
4+
Gruntfile.js export-ignore
5+
docker-compose.local.yml export-ignore
6+
.releaserc.yml export-ignore
7+
composer.lock export-ignore
8+
.nvmrc export-ignore
9+
package.json export-ignore
10+
package-lock.json export-ignore
11+
phpcs.xml export-ignore
12+
phpunit.xml export-ignore
13+
README.md export-ignore
14+
tests export-ignore
15+
bin export-ignore
16+
README.md export-ignore
17+
.github export-ignore
18+
.eslintrc export-ignore
19+
assets/js/src export-ignore
20+
docs export-ignore
21+
.wp-env.override.json export-ignore
22+
postcss.config.js export-ignore
23+
# Set the default behavior for all files.
24+
* text=auto
25+
26+
# Normalized and converts to
27+
# native line endings on checkout.
28+
*.php text
29+
30+
# Convert to LF line endings on checkout.
31+
*.sh text eol=lf
32+
33+
# Binary files.
34+
*.png binary
35+
*.jpg binary

.github/workflows/create-tag.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
create_tag:
9+
runs-on: ubuntu-latest
10+
if: "! contains(github.event.head_commit.message, '[skip ci]')"
11+
strategy:
12+
matrix:
13+
node-version: [18.x]
14+
steps:
15+
- uses: actions/checkout@master
16+
with:
17+
persist-credentials: false
18+
- name: Build files using ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Release new version
23+
id: release
24+
run: |
25+
npm ci
26+
npm run release
27+
env:
28+
CI: true
29+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
30+
GIT_AUTHOR_NAME: themeisle[bot]
31+
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
32+
GIT_COMMITTER_NAME: themeisle[bot]
33+
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}
34+
empty-job:
35+
# if no jobs run, github action considers it a test failure -- which seems like a bug
36+
# this makes it so the top-level if statement for the job does not give status failure.
37+
runs-on: ubuntu-latest
38+
if: success()
39+
steps:
40+
- name: Meep
41+
run: |
42+
echo "Nothing to do"

.github/workflows/e2e.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test e2e
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review]
6+
branches-ignore:
7+
- "update_dependencies"
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
11+
cancel-in-progress: true
12+
jobs:
13+
e2e:
14+
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
15+
name: Playwright E2E tests
16+
strategy:
17+
fail-fast: false
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Setup PHP version
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: "7.4"
24+
extensions: simplexml
25+
- name: Check out source files
26+
uses: actions/checkout@v4
27+
- name: Install composer deps
28+
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
29+
- name: Install npm deps
30+
run: |
31+
npm ci
32+
npm install -g playwright-cli
33+
npx playwright install --with-deps chromium
34+
- name: Install environment
35+
run: |
36+
cp ./bin/themeisle-sdk.php ./
37+
npm run wp-env start
38+
- name: Run the tests
39+
run: |
40+
npm run test:e2e:playwright
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
43+
- name: Archive test results
44+
if: failure()
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: e2e-playwright-results
48+
path: artifacts
49+
retention-days: 1
50+
if-no-files-found: ignore

.github/workflows/mirror.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Mirror Main Branch and Tags
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
mirror:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@master
15+
with:
16+
persist-credentials: false
17+
fetch-depth: 0
18+
19+
- name: Push main branch and tags to mirror repo
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
22+
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
23+
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}
24+
run: |
25+
git remote add mirror "https://${{ secrets.BOT_TOKEN }}@github.com/Codeinwp/themeisle-sdk-lib"
26+
# Reset to a single commit with no history
27+
git config --global user.email ${{ secrets.BOT_EMAIL }}
28+
git config --global user.name "pirate-bot"
29+
git checkout master
30+
git reset --soft $(git rev-list --max-parents=0 HEAD) # Go to the first commit, keeping changes
31+
git commit --amend -m "new changes" # Create a single commit
32+
33+
# Push to the mirror repo, overwriting history
34+
git push mirror master --force # Push only the master branch with new history
35+
git push mirror --tags --force

.github/workflows/new-issues.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Add to project
2+
3+
on:
4+
issues:
5+
types: [opened,transferred]
6+
7+
jobs:
8+
add-to-project:
9+
name: Add issue to project
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/add-to-project@main
13+
id: add_project
14+
with:
15+
project-url: ${{ secrets.PROJECT_PLANNING }}
16+
github-token: ${{ secrets.BOT_TOKEN_PROJECT }}
17+
- name: Set Team
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN_PROJECT }}
20+
run: |
21+
gh api graphql -f query='
22+
mutation(
23+
$project: ID!
24+
$item: ID!
25+
$status_field: ID!
26+
$status_value: String!
27+
) {
28+
updateProjectV2ItemFieldValue(
29+
input: {
30+
projectId: $project
31+
itemId: $item
32+
fieldId: $status_field
33+
value: {
34+
singleSelectOptionId: $status_value
35+
}
36+
}
37+
) {
38+
projectV2Item {
39+
id
40+
}
41+
}
42+
}' -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

0 commit comments

Comments
 (0)