Skip to content

Commit

Permalink
fix comments and add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Sep 8, 2023
1 parent f079766 commit 37be54b
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint-check-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
paths:
- '**.php'
- '!build/**/*.php'
pull_request:
types: [opened, edited, reopened, ready_for_review]
paths:
Expand Down Expand Up @@ -35,7 +34,6 @@ jobs:
with:
PATTERNS: |
**/*.php
!build/**/*.php
- name: Get Composer cache directory
id: composer-cache
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/satis-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Trigger Satis Build

on:
release:
types:
- created

jobs:
webhook:
name: Send Webhook
runs-on: ubuntu-latest
steps:

- name: Set Package
id: package
env:
REPO: ${{ github.repository }}
run: echo ::set-output name=PACKAGE::${REPO##*/}

- name: Set Version
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF##*/}

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.WEBHOOK_TOKEN }}
repository: newfold-labs/satis
event-type: 'satis-build'
client-payload: >-
{
"vendor": "${{ github.repository_owner }}",
"package": "${{ steps.package.outputs.PACKAGE }}",
"version": "${{ steps.tag.outputs.VERSION }}"
}
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# wp-module-onboarding-data
<a href="https://newfold.com/" target="_blank">
<img src="https://newfold.com/content/experience-fragments/newfold/site-header/master/_jcr_content/root/header/logo.coreimg.svg/1621395071423/newfold-digital.svg" alt="Newfold Logo" title="Newfold Digital" align="right"
height="42" />
</a>

# WordPress Onboarding Data Module
A non-toggleable module containing a standardized interface for interacting with Onboarding data.

## Installation

### 1. Add the Newfold Satis to your `composer.json`.

```bash
composer config repositories.newfold composer https://newfold.github.io/satis
```

### 2. Require the `newfold-labs/wp-module-onboarding-data` package.

```bash
composer require newfold-labs/wp-module-onboarding-data
```

[More on NewFold WordPress Modules](https://github.com/newfold-labs/wp-module-loader)
2 changes: 1 addition & 1 deletion includes/Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public static function get_fallback_from_slug( $pattern_slug ) {
* Fetches a pattern from the WP_Block_Patterns_Registry.
*
* @param string $pattern_slug The full slug of the pattern.
* @return array
* @return array|boolean
*/
public static function get_pattern_from_block_patterns_registry( $pattern_slug ) {
$block_patterns_registry = \WP_Block_Patterns_Registry::get_instance();
Expand Down
4 changes: 2 additions & 2 deletions includes/Services/FlowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class FlowService {
/**
* Initialize Flow Data on refresh.
*
* @return boolean
* @return boolean|array
*/
public static function initialize_data() {
$default_data = self::get_default_data();
Expand Down Expand Up @@ -98,7 +98,7 @@ public static function get_data() {
* Update the Onboarding flow data.
*
* @param array $params The params to update in flow data.
* @return array
* @return array|WP_Error
*/
public static function update_data( $params ) {
if ( empty( $params ) ) {
Expand Down

0 comments on commit 37be54b

Please sign in to comment.