-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add fix license header job * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Ignore unsupported files * Fix syntax for folder to ignore Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
88f04d7
commit 2a6bae6
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Fix License Headers | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
header-license-fix: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Configure git to use https | ||
run: git config --global hub.protocol https | ||
|
||
- name: Checkout the branch from the PR that triggered the job | ||
run: hub pr checkout ${{ github.event.pull_request.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Fix License Header | ||
uses: apache/skywalking-eyes/header@v0.4.0 | ||
with: | ||
mode: fix | ||
|
||
- name: Get modified files in the staging directory | ||
id: changed-files | ||
uses: tj-actions/changed-files@v24 | ||
|
||
- name: Apply Changes | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
shell: bash -l {0} | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add * | ||
git commit -m "Automatic application of license header" | ||
- name: Push fixes | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
shell: bash -l {0} | ||
run: | | ||
git config push.default upstream | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
header: | ||
license: | ||
spdx-id: BSD-3-Clause | ||
copyright-owner: Jupyter Development Team | ||
software-name: JupyterLab | ||
content: | | ||
Copyright (c) Jupyter Development Team. | ||
Distributed under the terms of the Modified BSD License. | ||
paths-ignore: | ||
- "**/*.json" | ||
- "**/*.md" | ||
- "**/*.po" | ||
- "**/*.svg" | ||
- "**/*.yml" | ||
- "**/*.yaml" | ||
- "**/.*" | ||
- "**/MANIFEST.in" | ||
- "LICENSE" | ||
- "jupyterlab_server/test_data" | ||
|
||
comment: on-failure |