Skip to content

Sync with upstream/master – Merge Conflicts #34697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
09b2b33
adding sync upstream actionb
Michael-Endacott-115800 Jun 2, 2025
e3077b8
Merge pull request #1 from NBS-Sandbox/Michael/fluentui-automation
Michael-Endacott-115800 Jun 2, 2025
1be95bc
updating secret name
Michael-Endacott-115800 Jun 2, 2025
def4a6c
Merge pull request #2 from NBS-Sandbox/Michael/fluentui-automation
Michael-Endacott-115800 Jun 2, 2025
66de9c6
updating upstream branch name
Michael-Endacott-115800 Jun 2, 2025
9b975aa
adding conditional check before abording merge
Michael-Endacott-115800 Jun 2, 2025
0e2bf3f
updating main to master
Michael-Endacott-115800 Jun 2, 2025
5a11864
Merge remote-tracking branch 'upstream/master'
actions-user Jun 3, 2025
5c7ae5d
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 3, 2025
407d76b
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 3, 2025
61d6d7d
adding npds patch
Michael-Endacott-115800 Jun 3, 2025
3b68583
Merge pull request #3 from NBS-Sandbox/Michael/test-app
Michael-Endacott-115800 Jun 3, 2025
0f0d955
updating ndps patch
Michael-Endacott-115800 Jun 3, 2025
2d1e456
Merge pull request #4 from NBS-Sandbox/Michael/test-app
Michael-Endacott-115800 Jun 3, 2025
e03e618
fix: add legacy-peer-deps flag to NPDS package installation
Michael-Endacott-115800 Jun 4, 2025
99dd9e5
fix: update authentication method for Azure DevOps npm feed
Michael-Endacott-115800 Jun 4, 2025
9c0d9f6
fix: streamline Azure DevOps npm authentication setup in workflow
Michael-Endacott-115800 Jun 4, 2025
cda8ac6
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 4, 2025
9cc2009
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 5, 2025
34446a8
updating patch worflow
Michael-Endacott-115800 Jun 5, 2025
7572ae4
Merge branch 'main' of https://github.com/NBS-Sandbox/fluentui
Michael-Endacott-115800 Jun 5, 2025
4a4ec12
updating patch
Michael-Endacott-115800 Jun 6, 2025
753483a
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 6, 2025
9807e70
Merge branch 'main' of https://github.com/NBS-Sandbox/fluentui
Michael-Endacott-115800 Jun 6, 2025
3bf2283
chore: layer NPDS button styles
github-actions[bot] Jun 6, 2025
ca874b0
updating to place the new file in the button folder
Michael-Endacott-115800 Jun 6, 2025
3304ac7
chore: layer NPDS button styles
github-actions[bot] Jun 6, 2025
d263b0d
update sync-upstream to trigger npds patch
Michael-Endacott-115800 Jun 6, 2025
9e6161f
chore: layer NPDS button styles
github-actions[bot] Jun 6, 2025
b6ae1d8
chore: layer NPDS button styles
github-actions[bot] Jun 7, 2025
f7973f7
chore: layer NPDS button styles
github-actions[bot] Jun 8, 2025
d59a4a7
Merge remote-tracking branch 'upstream/master'
actions-user Jun 9, 2025
3ab6c7d
chore: layer NPDS button styles
github-actions[bot] Jun 9, 2025
8d21a90
Merge remote-tracking branch 'upstream/master'
actions-user Jun 9, 2025
07467c7
chore: layer NPDS button styles
github-actions[bot] Jun 9, 2025
34ff373
Merge remote-tracking branch 'upstream/master'
actions-user Jun 9, 2025
77e4907
chore: layer NPDS button styles
github-actions[bot] Jun 9, 2025
682a2bc
updating patch workflow
Michael-Endacott-115800 Jun 9, 2025
19e53ac
Merge remote-tracking branch 'upstream/master'
actions-user Jun 9, 2025
325b894
updating npmrc
Michael-Endacott-115800 Jun 9, 2025
9cc4cc5
Merge branch 'main' of https://github.com/NBS-Sandbox/fluentui
Michael-Endacott-115800 Jun 9, 2025
cf031b7
adding package ci
Michael-Endacott-115800 Jun 9, 2025
99dae57
changing ci to install
Michael-Endacott-115800 Jun 9, 2025
a978cff
adding legacy peer deps
Michael-Endacott-115800 Jun 9, 2025
7ad777a
updated to keep name consiststent
Michael-Endacott-115800 Jun 9, 2025
520cbec
updating to avoid conflict
Michael-Endacott-115800 Jun 9, 2025
b66eec1
update
Michael-Endacott-115800 Jun 9, 2025
f3fcebd
Merge remote-tracking branch 'upstream/master'
actions-user Jun 9, 2025
aed5dee
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 10, 2025
8b802e7
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 11, 2025
29e59c9
Merge remote-tracking branch 'upstream/master'
actions-user Jun 12, 2025
bbf5b57
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 12, 2025
d6bbbff
Merge branch 'microsoft:master' into main
Michael-Endacott-115800 Jun 13, 2025
50d8385
Merge remote-tracking branch 'upstream/master'
actions-user Jun 14, 2025
bea6ffa
Merge remote-tracking branch 'upstream/master'
actions-user Jun 15, 2025
b863ab2
Merge remote-tracking branch 'upstream/master'
actions-user Jun 17, 2025
1053660
Merge remote-tracking branch 'upstream/master'
actions-user Jun 18, 2025
98cc9ba
adding workflows
Michael-Endacott-115800 Jun 18, 2025
78c6c38
changing scope
Michael-Endacott-115800 Jun 18, 2025
22a44ff
changing to npm publish
Michael-Endacott-115800 Jun 18, 2025
0efb815
updating package json
Michael-Endacott-115800 Jun 18, 2025
b6e7434
updating package
Michael-Endacott-115800 Jun 18, 2025
82cec1a
Merge remote-tracking branch 'upstream/master'
actions-user Jun 18, 2025
d5369df
updating package json
Michael-Endacott-115800 Jun 18, 2025
b2e1592
Merge branch 'master' of https://github.com/NBS-Sandbox/npds-lib-flue…
Michael-Endacott-115800 Jun 18, 2025
38856dc
fixing error
Michael-Endacott-115800 Jun 18, 2025
88f34f1
add ignore scripts to remove build errors
Michael-Endacott-115800 Jun 18, 2025
98e4c23
updating package for bump
Michael-Endacott-115800 Jun 18, 2025
dcb65f2
adding copy custom components
Michael-Endacott-115800 Jun 18, 2025
d47cc80
fixing typo
Michael-Endacott-115800 Jun 18, 2025
bed9779
editing custom styles file
Michael-Endacott-115800 Jun 18, 2025
1e15d36
updating workflow
Michael-Endacott-115800 Jun 18, 2025
5e99510
redoing clone repo logic
Michael-Endacott-115800 Jun 18, 2025
4f1ae15
adding read permission
Michael-Endacott-115800 Jun 18, 2025
05dbb60
Merge remote-tracking branch 'upstream/master'
actions-user Jun 19, 2025
d39f5da
Merge remote-tracking branch 'upstream/master'
actions-user Jun 19, 2025
e05da31
update to use PAT
Michael-Endacott-115800 Jun 19, 2025
f71430e
Merge branch 'master' of https://github.com/NBS-Sandbox/npds-lib-flue…
Michael-Endacott-115800 Jun 19, 2025
49475eb
Merge remote-tracking branch 'upstream/master'
actions-user Jun 19, 2025
ac73fd1
updating for stable versions
Michael-Endacott-115800 Jun 19, 2025
6872f9a
add stabler release pipeline
Michael-Endacott-115800 Jun 19, 2025
90d89e3
meant to commit to master
Michael-Endacott-115800 Jun 19, 2025
412e583
updating package.josn
Michael-Endacott-115800 Jun 19, 2025
c1760c3
Merge pull request #5 from NBS-Sandbox/stable
Michael-Endacott-115800 Jun 19, 2025
0e5bb3a
Merge remote-tracking branch 'upstream/master'
actions-user Jun 20, 2025
360cd95
Merge upstream/master with conflicts
actions-user Jun 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
83 changes: 83 additions & 0 deletions .github/workflows/_build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build and Publish Fluent UI

on:
workflow_dispatch:
push:
branches:
- main
- master

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node 20.19.2
uses: actions/setup-node@v4
with:
node-version: 20.19.2
registry-url: https://npm.pkg.github.com/
scope: '@nbs-sandbox'

- name: Install Yarn v1
run: npm install -g yarn@1

- name: Install root dependencies
run: yarn install

- name: Install web-components dependencies
working-directory: packages/web-components
run: yarn install

- name: Build Fluent UI web-components
working-directory: packages/web-components
run: yarn nx build

- name: Checkout custom-styles repo
uses: actions/checkout@v4
with:
repository: NBS-Sandbox/npds-fluentui-custom-files
token: ${{ secrets.CUSTOM_FILES_PAT }}
path: packages/web-components/.temp-custom-files
ref: main

- name: Apply Custom NPDS Styling
working-directory: packages/web-components
run: npm run overlay-styles

- name: Determine package version
id: get_version
run: |
VERSION=$(node -p "require('./packages/web-components/package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Bump version for stable line
if: startsWith(steps.get_version.outputs.VERSION, '2.')
working-directory: packages/web-components
run: npm run bump-patch stable

- name: Bump version for beta line
if: startsWith(steps.get_version.outputs.VERSION, '3.')
working-directory: packages/web-components
run: npm run bump-patch

- name: Publish to GitHub Packages
working-directory: packages/web-components
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ "${{ steps.get_version.outputs.VERSION }}" == 2.* ]]; then
echo "Publishing v${{ steps.get_version.outputs.VERSION }} → latest"
npm publish
else
echo "Publishing v${{ steps.get_version.outputs.VERSION }} → beta"
npm publish --tag beta
fi
108 changes: 108 additions & 0 deletions .github/workflows/_sync-fork-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Sync Fork with Upstream

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
outputs:
changes_made: ${{ steps.check-changes.outputs.changes_made }}

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.FLUENTUI_ACTION }}

- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"

- name: Add upstream remote
run: |
git remote add upstream https://github.com/microsoft/fluentui.git
git fetch upstream master
git fetch origin $DEFAULT_BRANCH

- name: Ensure on default branch
run: git checkout $DEFAULT_BRANCH

- name: Check for conflicts
id: check-conflicts
run: |
git checkout -b temp-merge-branch $DEFAULT_BRANCH
if git merge upstream/master --no-commit --no-ff; then
echo "has_conflicts=false" >> $GITHUB_OUTPUT
else
echo "has_conflicts=true" >> $GITHUB_OUTPUT
fi
git merge --abort || true
git checkout $DEFAULT_BRANCH
git branch -D temp-merge-branch

- name: Set date
id: date
run: echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT

- name: Check if there are changes to merge
id: check-changes
run: |
if git diff --quiet $DEFAULT_BRANCH upstream/master; then
echo "changes_made=false" >> $GITHUB_OUTPUT
else
echo "changes_made=true" >> $GITHUB_OUTPUT
fi

- name: Merge upstream if no conflicts
if: steps.check-conflicts.outputs.has_conflicts == 'false' && steps.check-changes.outputs.changes_made == 'true'
run: git merge upstream/master --no-edit

- name: Push merged changes
if: steps.check-conflicts.outputs.has_conflicts == 'false' && steps.check-changes.outputs.changes_made == 'true'
env:
GH_PAT: ${{ secrets.FLUENTUI_ACTION }}
run: git push https://[email protected]/${{ github.repository }}.git $DEFAULT_BRANCH

- name: Create conflict PR branch
if: steps.check-conflicts.outputs.has_conflicts == 'true'
env:
GH_PAT: ${{ secrets.FLUENTUI_ACTION }}
run: |
BRANCH=upstream-sync-${{ steps.date.outputs.date }}
git checkout -b $BRANCH
git merge upstream/master || true
git commit -am "Merge upstream/master with conflicts"
git push https://[email protected]/${{ github.repository }}.git $BRANCH

- name: Create Pull Request
if: steps.check-conflicts.outputs.has_conflicts == 'true'
uses: repo-sync/pull-request@v2
with:
source_branch: 'upstream-sync-${{ steps.date.outputs.date }}'
destination_branch: ${{ env.DEFAULT_BRANCH }}
pr_title: 'Sync with upstream/master – Merge Conflicts'
pr_body: |
This PR was automatically created by the GitHub Actions workflow to sync with upstream.
**Merge conflicts detected**
Please resolve the conflicts manually and merge this PR.
github_token: ${{ secrets.FLUENTUI_ACTION }}

- name: Trigger Build & Publish Workflow
if: steps.check-conflicts.outputs.has_conflicts == 'false' && steps.check-changes.outputs.changes_made == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "_build-and-publish.yml",
ref: process.env.DEFAULT_BRANCH
});
86 changes: 86 additions & 0 deletions .github/workflows/npds-patch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "NPDS Patch After Sync"
on:
workflow_call:
workflow_dispatch:
jobs:
apply-npds:
runs-on: ubuntu-latest
steps:
- name: Checkout FluentUI code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Clone NPDS repo from Azure DevOps
env:
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
run: |
git clone https://:[email protected]/nbsdev/NBS%20Product%20Design/_git/DesignSystem npds-repo

- name: Verify files exist before copying
run: |
echo "Checking NPDS file exists..."
if [ ! -f "npds-repo/packages/npds-components/src/components/button/button.styles.ts" ]; then
echo "NPDS button styles not found!"
echo "Available files in npds-repo:"
find npds-repo -name "*.styles.ts" | head -10
exit 1
fi

echo "Checking FluentUI target file exists..."
if [ ! -f "packages/web-components/src/button/button.styles.ts" ]; then
echo "FluentUI button styles not found!"
exit 1
fi

echo "Both files found, proceeding with copy..."

- name: Copy NPDS styles and patch Fluent button
run: |
TARGET_DIR="packages/web-components/src/button"
NPDS_SRC="npds-repo/packages/npds-components/src/components/button/button.styles.ts"
FLUENT_FILE="$TARGET_DIR/button.styles.ts"
NPDS_TARGET="$TARGET_DIR/npds-button-styles.ts"

# Skip if override already exists
if grep -q "NPDS OVERRIDE LAYER" "$FLUENT_FILE"; then
echo "NPDS override already present. Skipping patch step."
exit 0
fi

# Copy the NPDS button styles to the button folder
cp "$NPDS_SRC" "$NPDS_TARGET"

# Patch Fluent's button.styles.ts
sed -i '1iimport { buttonStyles as npdsButtonStyles } from "./npds-button-styles";' "$FLUENT_FILE"
sed -i 's/export const styles = css/export const originalButtonStyles = css/' "$FLUENT_FILE"
cat << 'EOF' >> "$FLUENT_FILE"
// ── NPDS OVERRIDE LAYER ──
export const styles = css`
${originalButtonStyles}
${npdsButtonStyles}
`;
// ────────────────────────
EOF

# Clean up
rm -rf npds-repo

- name: Commit and push NPDS patch
env:
GH_PAT: ${{ secrets.FLUENTUI_ACTION }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet -- packages/web-components/src/button/button.styles.ts; then
git add packages/web-components/src/button/button.styles.ts packages/web-components/src/button/npds-button-styles.ts
git commit -m "chore: layer NPDS button styles"
git push https://[email protected]/${GITHUB_REPOSITORY}.git main
else
echo "No NPDS changes needed."
fi
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Fluent UI Custom

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 1.0.1)'
required: true

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js and authentication
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@NBS-Sandbox'

- name: Set version from tag (if tag push)
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${GITHUB_REF#refs/tags/v}
npm version $VERSION --no-git-tag-version

- name: Set version from input (if manual)
if: github.event_name == 'workflow_dispatch'
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version

- name: Install dependencies & build
run: npm install -force

- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading