-
Notifications
You must be signed in to change notification settings - Fork 63.8k
Use curly braces in if condition #40865
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
Conversation
GitHub lint says it's strongly recommended to always wrap the full `if:` condition in `${{ }}`
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
There was a problem hiding this 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 PR updates a GitHub Actions workflow example to follow best practices by wrapping the if condition in curly braces syntax as recommended by GitHub lint.
- Added
${{ }}
wrapper around the if condition to align with GitHub's strongly recommended practices
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
@glenthomas Looks right to me! I didn't even know it was possible to do an |
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
GitHub lint says it's strongly recommended to always wrap the full
if:
condition in${{ }}
. I think it would be best to include this in the example code to avoid leading people into unexpected issues.See the GH-Lint documentation for an explanation.
What's being changed (if available, include any code snippets, screenshots, or gifs):
Add braces to if.
Check off the following: