Skip to content

Conversation

Planeshifter
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds a new workflow that checks for any opened PR whether contributor commits contain the expected pre-commit and pre-push metadata; if not or if various dependencies are missing, the @stdlib-bot leaves a comment on the respective PR outlining the necessary steps to ensure local development is fully initialized.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@Planeshifter Planeshifter requested a review from kgryte March 1, 2025 21:38
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 1, 2025
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: passed
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---

---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
  - task: run_javascript_examples
    status: na
  - task: run_c_examples
    status: na
  - task: run_cpp_examples
    status: na
  - task: run_javascript_readme_examples
    status: na
  - task: run_c_benchmarks
    status: na
  - task: run_cpp_benchmarks
    status: na
  - task: run_fortran_benchmarks
    status: na
  - task: run_javascript_benchmarks
    status: na
  - task: run_julia_benchmarks
    status: na
  - task: run_python_benchmarks
    status: na
  - task: run_r_benchmarks
    status: na
  - task: run_javascript_tests
    status: na
---

---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
  - task: run_javascript_examples
    status: na
  - task: run_c_examples
    status: na
  - task: run_cpp_examples
    status: na
  - task: run_javascript_readme_examples
    status: na
  - task: run_c_benchmarks
    status: na
  - task: run_cpp_benchmarks
    status: na
  - task: run_fortran_benchmarks
    status: na
  - task: run_javascript_benchmarks
    status: na
  - task: run_julia_benchmarks
    status: na
  - task: run_python_benchmarks
    status: na
  - task: run_r_benchmarks
    status: na
  - task: run_javascript_tests
    status: na
---
Copy link
Member

Choose a reason for hiding this comment

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

This logic looks okay. This is a case, however, where passing JSON meta data to a Node.js script would have been easier to follow and much simpler to write. Bash is not always the best tool for the job. For simple JSON transformation, using jq is fine. What we are doing here is much more difficult to maintain, and folks are going to be reluctant to touch this, especially if and when we add additional linters, etc.

But as long as you are agreeing to maintain this indefinitely and feel like this is the right path forward, I won't block this from being merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kgryte Well, what about this: I will maintain this and make tweaks and updates as we add linters. If at some point this becomes too unwieldy, I will translate it to a Node.js script.

@kgryte kgryte added Tools Issue or pull request related to project tooling. CI Issue or pull request specific to continuous integration environments. and removed Needs Review A pull request which needs code review. labels Mar 2, 2025
@kgryte kgryte merged commit a757fb3 into develop Mar 2, 2025
39 checks passed
@kgryte kgryte deleted the philipp/pr-commit-metadata-validation branch March 2, 2025 02:09
PraverBajaj pushed a commit to PraverBajaj/stdlib that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Issue or pull request specific to continuous integration environments. Tools Issue or pull request related to project tooling.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: stdlib-bot should comment on Pre-Commit and Pre-Push Report Anomalies

3 participants