Skip to content

Fixes missing "form" variable declaration. - #8797

Merged
daras-cu merged 1 commit into
hackforla:gh-pagesfrom
cchrizzle:resolve-codeql-alert49-6668
Sep 27, 2026
Merged

daras-cu merged 1 commit into
hackforla:gh-pagesfrom
cchrizzle:resolve-codeql-alert49-6668

Conversation

@cchrizzle

@cchrizzle cchrizzle commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #6668

What changes did you make?

  • Fixed missing form variable declaration by adding const (variable is not reassigned within function) based on original analysis:
Analysis: form is a local variable to pull the name and email from the field with id nameEmailForm and does not get reassigned within the function.

Recommendation: update code using const to declare form like the 2nd form function does in line 368.

Why did you make the changes (we will use this info to test)?

  • Keep variable localized and reduce risk of bugs.

CodeQL Alerts

After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.

Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
Instructions for resolving CodeQL alerts

If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.

In general, CodeQL alerts should be resolved prior to PR reviews and merging

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

  • No visual changes to the website

@github-actions

Copy link
Copy Markdown

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b cchrizzle-resolve-codeql-alert49-6668 gh-pages
git pull https://github.com/cchrizzle/website.git resolve-codeql-alert49-6668

@github-actions github-actions Bot added role: front end Tasks for front end developers Complexity: Medium P-Feature: Wins Page https://www.hackforla.org/wins/ size: 1pt Can be done in 4-6 hours Feature: Code Alerts HLC: S Homepage Launch Countdown Should Have labels Sep 22, 2026
@ldaws003
ldaws003 self-requested a review September 22, 2026 20:20
@ldaws003

Copy link
Copy Markdown
Member

Review ETA: Thursday
Review Availability: 3:00pm to 5:00pm

@Tomomi-K1
Tomomi-K1 self-requested a review September 23, 2026 01:16
@Tomomi-K1

Copy link
Copy Markdown
Member

Review ETA: 7pm 9/22/2026
Review Availability: Weekday 10am - 5pm

@computarisis
computarisis self-requested a review September 23, 2026 01:35
@computarisis

Copy link
Copy Markdown
Member

Review ETA: 7pm 9/23/2026
Review Availability: Everyday after 8pm ET

@Tomomi-K1 Tomomi-K1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great job and thank you for taking the issue!

  • I agree with your solution to add "const" in front of form
  • branches are correct
  • tested locally, submitting form worked

nit pick: It's anything that stops approval 👍

  • in issue page, I would check the box "In a comment in this issue, add your analysis and recommendations...."
  • in the pull request, I would delete the first paragraph "Please note: You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. Delete this message if you joined this team via onboarding."

@anthonylo87

Copy link
Copy Markdown
Member

Review ETA: 9/23 EOD
Review Availability: Evenings PST

@HackforLABot HackforLABot mentioned this pull request Sep 23, 2026
16 of 34 tasks
@egcuriel

Copy link
Copy Markdown
Member

Review ETA: 09/25/2026 EOD
Availability: F-Sun (5 pm - 11 pm)

@anthonylo87 anthonylo87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @cchrizzle,

Thanks for working on this issue, I've done my review - only thing I would modify is in the "What Changes Did You Make" section, include some of the details from your analysis on the parent issue (so I don't have to go back and forth between the issue/PR to understand what's going on)

i.e. "Fixed missing form variable declaration by adding const (variable is not reassigned within function)"

Other than that, everything looks great - issue linked correctly, branches set up correct, and no CodeQL alerts. Approved on my end!

@github-project-automation github-project-automation Bot moved this from PR Needs review to PRs ✅ waiting for merge team in P: HfLA Website: Project Board Sep 23, 2026

@computarisis computarisis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @cchrizzle! I've gone thorugh the details, and things looked good from my end. You correctly added 'const' to make the variable local and addess the warning; and you correctly went through the usual protocol for branching and filling the templates.

@ldaws003 ldaws003 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @cchrizzle, good work with this issue. The added keyword fixes the quality issue and keeps it inline with the how the other form variables are declared. Approved.

@daras-cu

Copy link
Copy Markdown
Member

@egcuriel I'm going to merge this as it has enough reviews, there are a couple other Medium PRs open right now you can review if you need to for your skills issue.

@daras-cu
daras-cu merged commit f15f846 into hackforla:gh-pages Sep 27, 2026
16 checks passed
@cchrizzle

Copy link
Copy Markdown
Member Author

@Tomomi-K1 & @anthonylo87 Appreciate both of your recommendations, went ahead and implemented them. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Medium Feature: Code Alerts HLC: S Homepage Launch Countdown Should Have P-Feature: Wins Page https://www.hackforla.org/wins/ role: front end Tasks for front end developers size: 1pt Can be done in 4-6 hours

Projects

Development

Successfully merging this pull request may close these issues.

Resolve CodeQL Alert #49 in wins-share-form.html- Generated by GHA

7 participants