Conversation
|
@ryanfkeller, this Pull Request is not linked to a valid issue. Above, on the first line of your PR, please link the number of the issue that you worked on using the format of 'Fixes #' + issue number, for example: Fixes #9876 Note: Do not use the number of this PR. |
|
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. |
|
|
||
| try { | ||
| if (ext === ".json") { | ||
| dirData[name] = JSON.parse(fs.readFileSync(fullPath, 'utf-8')); |
Check failure
Code scanning / CodeQL
Potential file system race condition High test
| dirData[name] = JSON.parse(fs.readFileSync(fullPath, 'utf-8')); | ||
| } else if (ext === '.yml' || ext === '.yaml') { | ||
| // Target YMLs might use multi-doc syntax, so we need to use loadAll | ||
| const ymlDocs = yaml.loadAll(fs.readFileSync(fullPath, 'utf-8')); |
Check failure
Code scanning / CodeQL
Potential file system race condition High test
assets/js/utility/vrms-events.mjs
Outdated
| --- | ||
| --- | ||
|
|
||
| import { filterTestEvents, sortEventsByDate } from "./vrms-events-utils.mjs"; |
Check notice
Code scanning / CodeQL
Syntax error Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the syntax error, all non-JavaScript code (i.e., the lines containing Liquid {% ... %} or {{ ... }} and the header --- lines) should be removed from assets/js/utility/vrms-events.mjs.
- Delete lines 1 and 2 containing just
---. - Remove line 6, the
{% assign vrmsData = site.data.external.vrms_data %}template code. - Replace line 7, which uses Liquid to attempt in-place assignment for
vrmsData, with a regular JavaScript assignment or, if the file receivesvrmsDatavia import or an environment variable, adjust accordingly. If template-time data injection is required, it should be done elsewhere, not inside a.mjsfile. Since we do not know howvrmsDatashould be supplied at runtime, we can assign it to an empty array or provide a placeholder with a comment to indicate where data should be provided. - The rest of the code is valid ES module JavaScript and does not require changes.
| @@ -1,11 +1,8 @@ | ||
| --- | ||
| --- | ||
|
|
||
| import { filterTestEvents, sortEventsByDate } from "./vrms-events-utils.mjs"; | ||
|
|
||
| {% assign vrmsData = site.data.external.vrms_data %} | ||
| const vrmsData = JSON.parse(decodeURIComponent("{{ vrmsData | jsonify | uri_escape }}")); | ||
|
|
||
| // TODO: Assign vrmsData to the appropriate value at runtime | ||
| // Example: const vrmsData = []; // or import from an external source at runtime | ||
| const vrmsData = []; // Placeholder assignment. Replace with actual data as needed. | ||
| /* vrmsDataFetch calls sortByDate function and passes filteredVrmsData variable, current page which can either be "events" for the right-col-content.html page or | ||
| "project" from the project.html page, and passes the appendMeetingTimes function from projects.js that appends the sorted vrmsData | ||
| returned by sortByDate to project.html. AppendMeetingTimes is only called if vrmsDataFetch is being called from project.js for the project.html page |
| </ul> | ||
| </div> | ||
| </nav> | ||
| ` |
Check notice
Code scanning / CodeQL
Semicolon insertion Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix this problem, we should ensure the assignment to defaultTestDom is followed by an explicit semicolon, as it is for other variable declarations and assignments in the file. This simply involves adding a semicolon immediately after the closing backtick at the end of line 20. This change maintains code style consistency and removes ambiguity regarding statement termination, without altering any program functionality.
| @@ -17,7 +17,7 @@ | ||
| </ul> | ||
| </div> | ||
| </nav> | ||
| ` | ||
| `; | ||
|
|
||
| let headerNav; | ||
| let burgerImage; |
|
|
||
| let headerNav; | ||
| let burgerImage; | ||
| let burgerIcon; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, we should remove the declaration of the unused variable burgerIcon from the file tests/frontend/integration/hamburger-nav.intg.test.js. Specifically, line 24 (let burgerIcon;) can simply be deleted. This will improve code readability, reduce confusion, and eliminate pointless code.
| @@ -21,7 +21,6 @@ | ||
|
|
||
| let headerNav; | ||
| let burgerImage; | ||
| let burgerIcon; | ||
| let burgerXIcon; | ||
|
|
||
| /********************** |
| let headerNav; | ||
| let burgerImage; | ||
| let burgerIcon; | ||
| let burgerXIcon; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
The best way to fix this problem is to remove the unused variable declaration for burgerXIcon at line 25 in tests/frontend/integration/hamburger-nav.intg.test.js. This does not change any existing functionality, as the variable was never assigned or read, and also makes the code cleaner and easier to maintain.
| @@ -22,7 +22,6 @@ | ||
| let headerNav; | ||
| let burgerImage; | ||
| let burgerIcon; | ||
| let burgerXIcon; | ||
|
|
||
| /********************** | ||
| * Test Helpers |
4263db8 to
f4cce04
Compare
|
@ryanfkeller, this Pull Request is not linked to a valid issue. Above, on the first line of your PR, please link the number of the issue that you worked on using the format of 'Fixes #' + issue number, for example: Fixes #9876 Note: Do not use the number of this PR. |
f4cce04 to
7e2793d
Compare
|
@ryanfkeller, this Pull Request is not linked to a valid issue. Above, on the first line of your PR, please link the number of the issue that you worked on using the format of 'Fixes #' + issue number, for example: Fixes #9876 Note: Do not use the number of this PR. |
1 similar comment
|
@ryanfkeller, this Pull Request is not linked to a valid issue. Above, on the first line of your PR, please link the number of the issue that you worked on using the format of 'Fixes #' + issue number, for example: Fixes #9876 Note: Do not use the number of this PR. |
…rla#8449) Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](stefanzweifel/git-auto-commit-action@v7.0.0...v7.1.0) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The devops repo is being renamed from https://github.com/hackforla/ops to https://github.com/hackforla/devops with this change users will be able to navigate to the renamed repo from the hfla website's communities of practice page: https://www.hackforla.org/communities-of-practice
…orla#8437) * changed program-areas to true * added program-areas to default * renamed citizen-engagement.html and moved to _layouts * made card appear based on page program area * made title reflect the page * renamed _citizen_engagement.scss file and updated import in main.scss
* update devops name 8388 * reverting to normal * redid changes for issue
Great job working on this issue @bragelbytes!
Broke testable functions out from vrms-events and current-projects into their associated -utils files. Added includeing the current-projects-utils.js script in current-projects Updated ESM-syntax vrms-events to use the extension .mjs, so it will be interpreted correctly by the test runner. Updated files that call vrms events to use the new extension.
Created hfla_test docker container that loads node:alpine for node environment testing Adds startup container commands to install dependencies required for testing, AND to launch Jest -- depending on how we want to use this, we may want to roll that back Adds a jest config that specifies where the source and test files are located, and how to map to our Jekyll transformer Adds a Jekyll transformer that processes JS files when "require" or "import" is called on them to populate both the frontmatter and inline LiquidJS statements with the real site data -- mostly useful for integration testing
Two basic unit tests with the extracted pure-logic functions Two "integration" tests, one demoing using a simulated DOMs, the other demoing testing against real Jekyll data
68eb481 to
dc3c099
Compare
Test edit 2. 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.
Fixes #replace_this_text_with_the_issue_number
What changes did you make?
Why did you make the changes (we will use this info to test)?
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
Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.
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)
Visuals before changes are applied
Visuals after changes are applied