Skip to content

Commit

Permalink
Delete the add_header script #5389
Browse files Browse the repository at this point in the history
The `add_header` script output is too volatile for the usage in this
project. The PRs get polluted with the changes made to each python file
header. Merges and other git actions can not be performed easily anymore.

The future of the python file headers and the acknowledgement of open source
contributors need to be discussed and re-evaluated. The job gets disabled
temporarily.
  • Loading branch information
Joel Dierkes authored and bari12 committed Mar 30, 2022
1 parent 8ea0202 commit 045868d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 298 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/autotest.yml
Expand Up @@ -7,29 +7,6 @@ on:
- cron: '0 3 * * *'

jobs:
header-lint:
if: 'github.event_name == ''pull_request'''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
# Check out pull request's HEAD commit instead of the merge commit to
# work-around an issue where wrong a commit is being checked out.
# For more details, see:
# https://github.com/actions/checkout/issues/299.
ref: ${{ github.event.pull_request.head.sha }}
- name: Check headers
shell: bash
run: |
echo "Current git rev $(git rev-parse HEAD)"
echo "Common ancestor git rev $(git merge-base HEAD remotes/origin/master)"
echo "If a file header needs to be changed run 'tools/add_header -i FILE' from the rucio project directory."
FILES=$(git diff --name-status HEAD $(git merge-base HEAD remotes/origin/master) | grep -v '^A' | cut -f 2 | grep -E '\.py$|^bin/') || echo "No Files found"
if [[ -n $FILES ]]; then
echo "Files to check: $FILES"
tools/add_header --disable-add-me -cd $FILES
fi
setup:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Expand Up @@ -8,11 +8,3 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
- repo: local
hooks:
- id: add-header
name: Run `add_header` script
description: Run the `add_header` script to verify the python file headers
entry: tools/add_header -i
language: system
types: [python]
267 changes: 0 additions & 267 deletions tools/add_header

This file was deleted.

0 comments on commit 045868d

Please sign in to comment.