Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: black
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1 # Use v1, NOT v2
- uses: actions/setup-python@v1
- run: pip install black
- run: black --check .
- name: If needed, commit black changes to a new pull request
if: failure()
run: |
black .
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -am "fixup! Format Python code with psf/black push"
git push --force origin HEAD:$GITHUB_REF
Comment on lines +1 to +19
Copy link
Owner

Choose a reason for hiding this comment

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

Thank you for your contribution. Can you change this to use ruff and also use it in the pre-commit hooks?

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# GeeksForGeeksScrapper
Scrapes [GeeksForGeeks](http://www.geeksforgeeks.org) and creates html & PDF for chosen category along with syntax highlighting for the code.

![black](https://github.com/itsvinayak/GeeksForGeeksScrapper/workflows/black/badge.svg?branch=master&event=push)

## Screenshots

Example of articles of C category as html:
Expand Down