Skip to content

Commit 2cb2ee9

Browse files
Merge pull request #64 from fcollonval/maintenance/add-workflows
Add workflows to ease maintenance
2 parents ac934c3 + 92af889 commit 2cb2ee9

File tree

6 files changed

+127
-0
lines changed

6 files changed

+127
-0
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
# Set update schedule for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
# Check for updates to GitHub Actions every weekday
8+
interval: "weekly"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://github.com/marketplace/actions/auto-author-assign
2+
name: 'Auto Author Assign'
3+
4+
on:
5+
pull_request_target:
6+
types: [opened, reopened]
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
assign-author:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: toshimaru/auto-author-assign@v1.6.1
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request_target:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Fix License Headers
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
header-license-fix:
8+
runs-on: ubuntu-20.04
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Configure git to use https
21+
run: git config --global hub.protocol https
22+
23+
- name: Checkout the branch from the PR that triggered the job
24+
run: hub pr checkout ${{ github.event.pull_request.number }}
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Fix License Header
29+
uses: apache/skywalking-eyes/header@v0.4.0
30+
with:
31+
mode: fix
32+
33+
- name: Commit any changes
34+
shell: bash -l {0}
35+
run: |
36+
git config user.name "github-actions[bot]"
37+
git config user.email "github-actions[bot]@users.noreply.github.com"
38+
39+
git pull --no-tags
40+
git add *
41+
git commit --allow-empty -m "Automatic application of license header"
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Get modified files
46+
id: changed-files
47+
uses: tj-actions/changed-files@v31.0.1
48+
with:
49+
base_sha: 'HEAD~1'
50+
sha: 'HEAD'
51+
52+
- name: Push fixes
53+
if: steps.changed-files.outputs.any_changed == 'true'
54+
shell: bash -l {0}
55+
run: |
56+
echo "Changed files"
57+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
58+
echo " $file"
59+
done
60+
git diff HEAD~1
61+
62+
git config push.default upstream
63+
git push
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.licenserc.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
header:
2+
license:
3+
spdx-id: BSD-3-Clause
4+
copyright-owner: Jupyter Development Team
5+
software-name: Jupyter YDoc
6+
content: |
7+
Copyright (c) Jupyter Development Team.
8+
Distributed under the terms of the Modified BSD License.
9+
10+
paths-ignore:
11+
- '**/*.ipynb'
12+
- '**/*.json'
13+
- '**/*.md'
14+
- '**/*.svg'
15+
- '**/*.yml'
16+
- '**/*.yaml'
17+
- '**/build'
18+
- '**/lib'
19+
- '**/node_modules'
20+
- '*.map.js'
21+
- '*.bundle.js'
22+
- '**/.*'
23+
- 'LICENSE'
24+
25+
comment: on-failure

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
BSD 3-Clause License
22

3+
Copyright (c) 2022, Jupyter Development Team
34
Copyright (c) 2022, David Brochart
45
All rights reserved.
56

0 commit comments

Comments
 (0)