Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
syvlabs committed Nov 21, 2024
1 parent 6693b6c commit 0b2575e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ jobs:
id: prepare_message
if: steps.pr_versions.outputs.pr_vanilla == steps.main_versions.outputs.main_vanilla || steps.pr_versions.outputs.pr_react == steps.main_versions.outputs.main_react
run: |
MESSAGE="Found changes in \`pacakges/**\` but versions were not updated. @${{ github.event.pull_request.user.login }}, please consider bumping the version of the followings."
MESSAGE="Found changes in \`packages/**\` but the version numbers remained the same.\n We ideally want to increment the version numbers when making changes to the packages.\n\n@${{ github.event.pull_request.user.login }}, please consider bumping the version of the following packages:"
if [ "${{ steps.pr_versions.outputs.pr_vanilla }}" = "${{ steps.main_versions.outputs.main_vanilla }}" ]; then
MESSAGE="$MESSAGE <br /> - \`packages/vanilla\`: Current version in main: \`${{ steps.main_versions.outputs.main_vanilla }}\`"
fi
if [ "${{ steps.pr_versions.outputs.pr_react }}" = "${{ steps.main_versions.outputs.main_react }}" ]; then
MESSAGE="$MESSAGE <br /> - \`packages/react\`: Current version in main: \`${{ steps.main_versions.outputs.main_react }}\`"
fi
MESSAGE="$MESSAGE <br /> Version numbers should be incremented when making changes to the packages."
echo "message=$MESSAGE" >> $GITHUB_OUTPUT
- name: Comment on PR
Expand Down
1 change: 1 addition & 0 deletions apps/react-example/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const RootLayout: FC<RootLayoutProps> = ({ children }) => {
return (
<html lang="en">
<head>
<title>OpenPay React Example</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
Expand Down
15 changes: 15 additions & 0 deletions packages/utils/src/flows/ojs-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,28 @@ export type OjsFlowParams = {
flowCallbacks: OjsFlowCallbacks;
};

export type CanDoOjsFlowParams = {
/**
* Contains the context where OJS is run.
* Ideally this only contains "background" context (OJS-level objects), and not flow-level objects.
*/
context: OjsContext;

/**
* The checkout payment method object to be used for the flow.
*/
checkoutPaymentMethod: CheckoutPaymentMethod;
};

export interface OjsFlow {
/**
* Runs the OJS flow
*/
runFlow: RunOjsFlow;
}

export type CanDoOjsFlow = (params: CanDoOjsFlowParams) => boolean;

export type RunOjsFlow = (params: OjsFlowParams) => Promise<void>;

export type SimpleOjsFlowResult =
Expand Down

0 comments on commit 0b2575e

Please sign in to comment.