Skip to content

finnnal#101

Merged
SaranHiruthikM merged 1 commit into
mainfrom
chore/final
Mar 11, 2026
Merged

finnnal#101
SaranHiruthikM merged 1 commit into
mainfrom
chore/final

Conversation

@SaranHiruthikM
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 03:28
@SaranHiruthikM SaranHiruthikM merged commit 42913df into main Mar 11, 2026
2 checks passed
Copy link
Copy Markdown

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

Adds manual triggering and adjusts deploy gating in the GitHub Actions CI/CD workflow for the FarmSmart project.

Changes:

  • Adds workflow_dispatch so the pipeline can be started manually.
  • Tweaks commented Jest test step formatting.
  • Switches Render deploy hook presence checks from env.* to secrets.* in the deploy steps.

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

branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

workflow_dispatch was added, but the deploy job is still gated by if: github.event_name == 'push', so manually running the workflow will never deploy. If the intent is to allow manual deploys, update the deploy job if to also allow workflow_dispatch (or make that behavior explicit by renaming/adding a separate manual deploy workflow).

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +39
#- name: Run Tests (Jest)
# run: npm test -- --passWithNoTests
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The commented-out Jest step is formatted as #- name / # run, which is easy to misread and inconsistent with the rest of the YAML. Consider either removing these commented lines entirely or formatting them as standard commented YAML (# - name, # run) so it’s obvious how to re-enable the step.

Suggested change
#- name: Run Tests (Jest)
# run: npm test -- --passWithNoTests
# - name: Run Tests (Jest)
# run: npm test -- --passWithNoTests

Copilot uses AI. Check for mistakes.
steps:
- name: Trigger Render Deploy (Backend)
if: env.RENDER_DEPLOY_HOOK_BACKEND != ''
if: "${{ secrets.RENDER_DEPLOY_HOOK_BACKEND != '' }}"
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The step-level if is wrapped in quotes (if: "${{ ... }}"). While it may still evaluate, it’s non-idiomatic and can lead to confusing type coercion. Prefer if: ${{ secrets.RENDER_DEPLOY_HOOK_BACKEND != '' }} (no quotes) for a clear boolean condition.

Copilot uses AI. Check for mistakes.
Comment on lines 85 to 87
- name: Trigger Render Deploy (Backend)
if: env.RENDER_DEPLOY_HOOK_BACKEND != ''
if: "${{ secrets.RENDER_DEPLOY_HOOK_BACKEND != '' }}"
run: curl "${{ secrets.RENDER_DEPLOY_HOOK_BACKEND }}"
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

curl will exit 0 for many HTTP error responses unless --fail is used, which can make the deploy step look successful even when the Render hook returns 4xx/5xx. Consider using curl --fail --show-error --silent (and optionally retries) so CI correctly fails on unsuccessful deploy triggers.

Copilot uses AI. Check for mistakes.
Comment on lines 89 to 91
- name: Trigger Render Deploy (Frontend)
if: env.RENDER_DEPLOY_HOOK_FRONTEND != ''
if: "${{ secrets.RENDER_DEPLOY_HOOK_FRONTEND != '' }}"
run: curl "${{ secrets.RENDER_DEPLOY_HOOK_FRONTEND }}"
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

Same as the backend deploy step: consider using curl --fail --show-error --silent (and optionally retries) so the workflow fails when the Render hook responds with an error status instead of reporting a false-green deploy.

Copilot uses AI. Check for mistakes.

- name: Trigger Render Deploy (Frontend)
if: env.RENDER_DEPLOY_HOOK_FRONTEND != ''
if: "${{ secrets.RENDER_DEPLOY_HOOK_FRONTEND != '' }}"
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

The frontend deploy step if is also wrapped in quotes (if: "${{ ... }}"). Prefer the unquoted boolean expression form (if: ${{ secrets.RENDER_DEPLOY_HOOK_FRONTEND != '' }}) for clarity and to avoid confusing coercion.

Copilot uses AI. Check for mistakes.
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