Skip to content

[Build-Netlify] update netlify.toml file to build feature branch PRs#5860

Open
Sulaymon333 wants to merge 1 commit intomasterfrom
netflify-deploy-wip
Open

[Build-Netlify] update netlify.toml file to build feature branch PRs#5860
Sulaymon333 wants to merge 1 commit intomasterfrom
netflify-deploy-wip

Conversation

@Sulaymon333
Copy link
Collaborator

Deploy Preview

What does this PR do?

  • add deploy preview for feature branches starting with wip-*

What are the relevant issues?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

Should this PR be mentioned in Design System updates?

Is this change backwards compatible or is it a breaking change?

Copilot AI review requested due to automatic review settings February 25, 2026 13:17
@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

⚠️ No Changeset found

Latest commit: 9cc917c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for hpe-theme-preview canceled.

Name Link
🔨 Latest commit 9cc917c
🔍 Latest deploy log https://app.netlify.com/projects/hpe-theme-preview/deploys/699ef67c08e4fd00080c48b5

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for hpe-design-icons-grommet canceled.

Name Link
🔨 Latest commit 9cc917c
🔍 Latest deploy log https://app.netlify.com/projects/hpe-design-icons-grommet/deploys/699ef67cab7b3800088de678

@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for unrivaled-bublanina-3a9bae canceled.

Name Link
🔨 Latest commit 9cc917c
🔍 Latest deploy log https://app.netlify.com/projects/unrivaled-bublanina-3a9bae/deploys/699ef67b2bb7f00008e5813f

@@ -1,2 +1,14 @@
[build.environment]
YARN_FLAGS = "--update-checksums" No newline at end of file
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this line since we have moved away from yarn and now run pnpm as our package manager

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aims to configure Netlify build behavior for deploy previews by adding a build ignore script to netlify.toml. The PR description indicates it should enable deploy previews for feature branches starting with "wip-*", but the implementation has critical logic issues.

Changes:

  • Adds a build ignore script to control when Netlify generates deploy previews based on branch names and build context
  • Removes the previous build.environment configuration containing YARN_FLAGS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +11
case "$BRANCH" in
wip-*) exit 1 ;;
*) exit 0 ;;
esac
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic appears to be inverted from what the PR description states. According to the PR description, this change should "add deploy preview for feature branches starting with wip-". However, the current logic skips builds (exit 1) for branches matching "wip-" pattern, which means deploy previews will NOT be generated for these branches. If the intent is to enable deploy previews for wip-* branches, the case statement should be: wip-*) exit 0 ;; *) exit 1 ;; instead.

Copilot uses AI. Check for mistakes.
esac
fi
exit 1
''' No newline at end of file
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous build.environment configuration with YARN_FLAGS has been completely removed without explanation. If this was intentional, consider documenting why this configuration is no longer needed. If the YARN_FLAGS setting is still required, it should be preserved alongside the new ignore configuration.

Suggested change
'''
'''
# Note: A previous [build.environment] configuration with YARN_FLAGS was intentionally removed.
# The build no longer relies on custom Yarn flags, so the YARN_FLAGS setting is not required here.

Copilot uses AI. Check for mistakes.
*) exit 0 ;;
esac
fi
exit 1
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The final exit 1 at line 13 will execute for all contexts other than deploy-preview, which means builds will be skipped for production deployments and branch deployments. If the intent is to only control deploy-preview builds and allow other build contexts to proceed normally, this line should be exit 0 instead, or the entire if block should not have a fallthrough exit statement.

Suggested change
exit 1
exit 0

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is wrong based on Netlify documentation on ignore exit code

@Sulaymon333 Sulaymon333 changed the title [build-Netlify] update netlify.toml file to buiuld feature branch PRs [Build-Netlify] update netlify.toml file to buiuld feature branch PRs Feb 25, 2026
@britt6612 britt6612 changed the title [Build-Netlify] update netlify.toml file to buiuld feature branch PRs [Build-Netlify] update netlify.toml file to build feature branch PRs Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants