Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
bd8e860
REFACTOR: Update configuration files
patil-vipul Dec 15, 2025
a1ec928
REFACTOR: Update workflow files
patil-vipul Dec 15, 2025
d9f46ec
REFACTOR: Package management files
patil-vipul Dec 15, 2025
d264a4c
REFACTOR: Testing files
patil-vipul Dec 15, 2025
223d367
REFACTOR: Shared code migration
patil-vipul Dec 15, 2025
50855f2
REFACTOR: Module Migration
patil-vipul Dec 17, 2025
62892ff
REFACTOR: Plugin Code Migration
patil-vipul Dec 18, 2025
f534389
REFACTOR: PHP Linting
patil-vipul Dec 18, 2025
9910bad
REFACTOR: Js Linting
patil-vipul Dec 18, 2025
3e313d4
FIX: Media replacement issue.
patil-vipul Dec 18, 2025
6c6d13a
FIX: Move templates
patil-vipul Dec 18, 2025
39849ad
FIX: Remove unwanted constants
patil-vipul Dec 18, 2025
90d8814
FIX: PHP Lint fix
patil-vipul Dec 18, 2025
1d34d23
REFACTOR: Fix phpcs issues
patil-vipul Dec 18, 2025
c3f0da6
chore: refactor to TS
up1512001 Dec 18, 2025
c95b9f1
remove: utils
up1512001 Dec 18, 2025
b8c5ac6
Merge pull request #15 from rtCamp/feat/js
patil-vipul Dec 18, 2025
1a22cf1
REFACTOR: Fix phpcs issues
patil-vipul Dec 18, 2025
2f9300e
Merge `refactor/phpcs` into `refactor/psr4`
patil-vipul Dec 18, 2025
cb2faa8
REFACTOR: PHPCS issues
patil-vipul Dec 18, 2025
281b589
FIX: PR Feedback issues
patil-vipul Dec 19, 2025
b83acc7
FIX: PR Feedback issues
patil-vipul Dec 19, 2025
074e7ea
FIX: Media replacement not working outside media sharing.
patil-vipul Dec 19, 2025
d812dc6
REFACTOR: Move templates out of MediaSharing library
patil-vipul Dec 19, 2025
bfa20dd
REFACTOR: Rename functions, add comments
patil-vipul Dec 20, 2025
0214209
REFACTOR: Remove shared code from Rest controllers
patil-vipul Dec 20, 2025
c2edc3c
REFACTOR: Return early if not doing ajax request
patil-vipul Dec 20, 2025
a0ccab8
REFACTOR: Remove extra namespaces
patil-vipul Dec 20, 2025
2d00727
REFACTOR: Convert inline function to class method
patil-vipul Dec 20, 2025
ac211ec
REFACTOR: Make inline function to method
patil-vipul Dec 20, 2025
0947d70
chore: update nvmrc
justlevine Dec 20, 2025
73102bc
chore: autofix lints
justlevine Dec 20, 2025
4c78155
chore: replace `*/number` with `int
justlevine Dec 20, 2025
2a66ab7
chore: phpstan low hanging fruit
justlevine Dec 20, 2025
74244cb
chore: fixes - second pass
justlevine Dec 20, 2025
d6fe224
chore: update deps
justlevine Dec 20, 2025
87b27f7
chore: remove unnecessary prefix
justlevine Dec 21, 2025
230985d
chore: even more cleanup
justlevine Dec 22, 2025
00c023b
FEAT: Update `check_api_permission`
patil-vipul Dec 22, 2025
31191eb
FIX: Governing site condition
patil-vipul Dec 22, 2025
69ab297
FIX: Make use of get_sync_sites where required
patil-vipul Dec 22, 2025
a11bf66
FIX: Keep trailing slash in URLs
patil-vipul Dec 22, 2025
262a52e
FIX: Remove unnecessary hash_equals
patil-vipul Dec 22, 2025
c258c89
FIX: Reduce DB calls
patil-vipul Dec 22, 2025
07e96e0
Fix: sync media condition
up1512001 Dec 22, 2025
24cb60a
Fix: missing meta issue
up1512001 Dec 22, 2025
56be39a
Fix: health check
up1512001 Dec 22, 2025
13a444a
FIX: PR feedback
patil-vipul Dec 22, 2025
b493e75
ci: remove unnecessary bin
justlevine Dec 22, 2025
147b526
FIX: PR feedbacks
patil-vipul Dec 22, 2025
d92b1d8
FIX: Ensure attachment_data
patil-vipul Dec 22, 2025
28237c7
FIX: Minor changes
patil-vipul Dec 22, 2025
8ce330b
REFACTOR: Move `health_check_attachment_brand_sites` to below
patil-vipul Dec 22, 2025
4c7b2e7
REFACTOR: Spacing added
patil-vipul Dec 22, 2025
784a6d8
REFACTOR: Rename method brand_sites_synced_media_callback
patil-vipul Dec 22, 2025
0e3451d
FIX: Ensure we're having array in `attachment_metadata`
patil-vipul Dec 22, 2025
cb114df
chore: dedupe same function
up1512001 Dec 23, 2025
13ad7aa
REFACTOR: Move function.
patil-vipul Dec 23, 2025
197cbb1
FIX: PHP Stan analysis
patil-vipul Dec 23, 2025
15bc71c
FIX: Js lint issues
patil-vipul Dec 23, 2025
3bdb936
chore: JS cleanup
up1512001 Dec 23, 2025
e762faf
Fix: linting issue
up1512001 Dec 23, 2025
59b52f3
Fix: frame selection issue
up1512001 Dec 23, 2025
bcac19f
ENHANCEMENT: Make better brand site sync media protection.
patil-vipul Dec 23, 2025
6cde298
FIX: Check object type
patil-vipul Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

21 changes: 17 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# WordPress Coding Standards.
# https://make.wordpress.org/core/handbook/coding-standards/
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://developer.wordpress.org/coding-standards/wordpress-coding-standards/

root = true

Expand All @@ -10,9 +13,19 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{.babelrc,.eslintrc,.rtlcssrc,*.json,*.yml}]
indent_style = space
[*.json]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

[*.txt]
trim_trailing_whitespace = false

[*.{yml,yaml}]
insert_final_newline = false
quote_type = single
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**/*.min.js
**/node_modules/**
**/vendor/**
build/*
**/build/**
39 changes: 0 additions & 39 deletions .eslintrc

This file was deleted.

79 changes: 79 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"root": true,
"extends": [
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:eslint-comments/recommended"
],
"plugins": [],
"env": {
"browser": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"globals": {
"_": true,
"OneMediaOnboarding": true,
"OneMediaSettings": true,
"OneMediaMediaSharing": true,
"OneMediaMediaFrame": true,
"OneMediaMediaUpload": true
},
"rules": {
"eslint-comments/no-unlimited-disable": "error",
"jsdoc/check-indentation": "error",
"@wordpress/no-unsafe-wp-apis": "warn",
"no-shadow": "warn",
/* WordPress surfaces snake_case keys and globals; allow them */
"camelcase": "off"
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-undef": "off",
"no-unused-vars": "off",
"no-shadow": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unused-vars": "error"
}
},
{
"files": ["**/*.d.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-undef": "off",
"import/no-unresolved": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
},
{
"files": [
"**/__tests__/**/*.js",
"**/test/*.js",
"**/?(*.)test.js",
"tests/js/**/*.js"
],
"extends": ["plugin:jest/all"],
"rules": {
// Add Rules for Jest here
}
}
]
}
57 changes: 57 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

##
# This allows Composer dependencies to be installed using a single step.
#
# Since the tests are currently run within the Docker containers where the PHP version varies,
# the same PHP version needs to be configured for the action runner machine so that the correct
# dependency versions are installed and cached.
##
- name: Set up PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: "8.3"
coverage: none

- name: Install Composer dependencies
uses: ramsey/composer-install@a2636af0004d1c0499ffca16ac0b4cc94df70565 # v3.1.0

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
with:
cache: "npm"
node-version-file: ".nvmrc"

- name: Install NPM dependencies
run: npm ci
env:
CI: true

- name: Build assets for development
run: npm run build:dev
21 changes: 0 additions & 21 deletions .github/workflows/phpcs_on_pull_request.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Upload Package on Release
permissions:
contents: write

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

on:
release:
types: [published]

jobs:
tag:
name: Upload New Release
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
persist-credentials: false

- name: Set up PHP
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: "8.3"
coverage: none
tools: composer:v2

- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1

- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5.0.0
with:
cache: "npm"
node-version-file: ".nvmrc"

- name: Install NPM dependencies
run: npm ci
env:
CI: true

- name: Build JavaScript assets
run: npm run build:prod

- name: Create Artifact
run: |
npm run plugin-zip

- name: Upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: onemedia
path: onemedia.zip

- name: Upload release asset
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
with:
files: onemedia.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading