Skip to content

GitHub actions to check formatting - #265

Merged
grzanka merged 13 commits into
masterfrom
github-actions-to-check-formatting
Mar 31, 2026
Merged

grzanka merged 13 commits into
masterfrom
github-actions-to-check-formatting

Conversation

@dazakdev

@dazakdev dazakdev commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

This pull request adds a new GitHub Actions workflow to automate pre-commit checks on every push to the master branch and on pull requests. The workflow ensures that code quality checks are consistently run in CI before changes are merged.

Continuous integration improvements:

  • Added a .github/workflows/pre-commit.yml workflow that installs pre-commit via pip, sets up Python 3.12, and runs all pre-commit hooks on every push to master and on pull requests.
  • Added permissions: contents: read to the workflow to follow least-privilege security practices.

Comment thread .github/workflows/pre-commit.yml Fixed
dazakdev and others added 3 commits March 31, 2026 14:53
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow to run the repository’s pre-commit hooks in CI on pushes to master and on pull requests, improving consistency of formatting/lint checks before merge.

Changes:

  • Added .github/workflows/pre-commit.yml to set up Python/Poetry and run pre-commit run --all-files in CI.
  • Normalized .git-blame-ignore-revs file formatting (adds trailing newline).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/pre-commit.yml New workflow to install dependencies and run all pre-commit hooks in CI.
.git-blame-ignore-revs Ensures the file has a proper trailing newline / consistent formatting.

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

Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread .github/workflows/pre-commit.yml Outdated
dazakdev and others added 2 commits March 31, 2026 15:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.


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

Comment thread pyproject.toml Outdated
@dazakdev
dazakdev requested a review from grzanka March 31, 2026 13:26
@grzanka

grzanka commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

I'd suggest getting rid of duplicated dependencies in pyproject and simply pip install pre-commit (without cache) in the GHA job.

@dazakdev
dazakdev force-pushed the github-actions-to-check-formatting branch from 46e75b4 to 8749105 Compare March 31, 2026 16:25
@dazakdev
dazakdev requested a review from Copilot March 31, 2026 16:46
Comment thread .github/workflows/pre-commit.yml Fixed
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.


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

Comment thread .github/workflows/pre-commit.yml

Copilot AI commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

I'd suggest getting rid of duplicated dependencies in pyproject and simply pip install pre-commit (without cache) in the GHA job.

Done in commit 74ba143 — removed pre-commit from the test group in pyproject.toml. The workflow already uses pip install pre-commit directly without caching.

@dazakdev
dazakdev force-pushed the github-actions-to-check-formatting branch from 74ba143 to 7adb516 Compare March 31, 2026 16:56
@dazakdev

Copy link
Copy Markdown
Contributor Author

@grzanka it should be alright now

Comment thread .github/workflows/pre-commit.yml Outdated
Comment thread .github/workflows/pre-commit.yml Outdated

@grzanka grzanka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See suggestions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.


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

Comment thread .github/workflows/pre-commit.yml
Comment thread .github/workflows/pre-commit.yml
dazakdev and others added 3 commits March 31, 2026 21:58
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@grzanka
grzanka merged commit 47791d4 into master Mar 31, 2026
19 checks passed
@grzanka
grzanka deleted the github-actions-to-check-formatting branch March 31, 2026 20:05
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.

5 participants