Skip to content

fix: resolve implicit global variables in github-queries.js#816

Closed
praaatap wants to merge 3 commits intoprecice:masterfrom
praaatap:fix/github-queries-globals
Closed

fix: resolve implicit global variables in github-queries.js#816
praaatap wants to merge 3 commits intoprecice:masterfrom
praaatap:fix/github-queries-globals

Conversation

@praaatap
Copy link
Copy Markdown
Contributor

Description

This PR fixes a few places where variables were being assigned without an explicit declaration (let, const, or var) in [js/github-queries.js]

  • Pollution of the global namespace.
  • Conflict with other scripts.
  • Difficult-to-debug side effects.

I have refactored these places to use const because these variables are not being reassigned in their scopes.

Changes

  • Declared date inside the function.
  • Declared [tag]
  • Declared count inside the stargazers-fetching closure.

Verification

  • Verified by reviewing the script logic.
  • Verified locally to ensure GitHub stats are still being fetched and displayed correctly.

@MakisH MakisH added GSoC Contributed in the context of the Google Summer of Code technical Technical issues on the website labels Feb 26, 2026
Comment thread js/github-queries.js Outdated
@precice-bot
Copy link
Copy Markdown
Contributor

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/gsoc-2026-introduction-hanzalah-waheed/2745/5

@MakisH
Copy link
Copy Markdown
Member

MakisH commented Mar 14, 2026

This makes sense overall.

@praaatap could you please update and resolve the conflicts? There is also an unresolved conversation.

@praaatap praaatap marked this pull request as draft March 14, 2026 15:26
@MakisH
Copy link
Copy Markdown
Member

MakisH commented Mar 14, 2026

@praaatap the conflict resolution reverted the changes of #793.

@praaatap praaatap closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Contributed in the context of the Google Summer of Code technical Technical issues on the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants