Skip to content

Commit

Permalink
Sync main branch from pricefx-eds-qa, excluding fstab.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 1, 2024
2 parents ae88f3c + 796012e commit c8ca2e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/dev_to_qa_code_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Reset changes before merge
run: |
git reset --hard HEAD
git clean -df
# Ensures a clean working directory before starting the merge process

- name: Configure Git identity
run: |
git config user.email "actions@github.com"
git config user.name "Github Actions"
# Configures Git user identity for the actions

- name: Fetch latest changes from pricefx-eds
run: |
git remote add pricefx-eds https://github.com/pricefx/pricefx-eds || true
git fetch pricefx-eds main:pricefx-eds-main
# Adds pricefx-eds as a remote and fetches the latest changes from main branch

- name: Merge changes excluding fstab.yaml
run: |
Expand All @@ -33,9 +41,12 @@ jobs:
git checkout -- fstab.yaml
git add .
git commit -m "Sync main branch from pricefx-eds, excluding fstab.yaml"
# Merges changes from pricefx-eds-main branch, resolves conflicts by taking their changes,
# and ensures that fstab.yaml remains unchanged locally

- name: Push changes to pricefx-eds-qa
run: |
git push https://github.com/pricefx/pricefx-eds-qa HEAD:main
env:
GIT_PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_PERSONAL_ACCESS_TOKEN }}
# Pushes changes to pricefx-eds-qa repository using a GitHub Personal Access Token
15 changes: 1 addition & 14 deletions blocks/title-pfx/title-pfx.js
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
export default async function decorate(block) {
const titleData = block.children[0]?.querySelector('p')?.textContent.trim() || '';
const titleType = block.children[1]?.querySelector('p')?.textContent.trim() || 'h2';
const titleColor = block.children[2]?.querySelector('p')?.textContent.trim() || 'title-dark-grey';
block.innerHTML = '';
if (titleData) {
const titleElement = document.createElement(titleType);
if (titleColor !== '') {
block.classList.add(titleColor);
}
titleElement.innerHTML = titleData;
block.append(titleElement);
}
}
/* eslint-disable */

0 comments on commit c8ca2e8

Please sign in to comment.