Skip to content

Commit eb22899

Browse files
authored
refactor: clean Makefile and CI (#62)
1 parent 282907f commit eb22899

21 files changed

+295
-154
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Makefile text eol=lf
2828
# specify which files/dirs to ignore on [download ZIP] (not a git repo)
2929
.github export-ignore
3030
.test export-ignore
31-
.docs export-ignore
31+
docs export-ignore
3232
img export-ignore
3333
.gitattributes export-ignore
3434
.gitignore export-ignore
@@ -41,6 +41,7 @@ CODEOWNERS export-ignore
4141
CONTRIBUTING.md export-ignore
4242
Doxyfile export-ignore
4343
environment.yml export-ignore
44+
Makefile export-ignore
4445
meta.yaml export-ignore
4546
paper.bib export-ignore
4647
paper.md export-ignore

.github/auto_assign.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Set to true to add reviewers to pull requests
2+
addReviewers: true
3+
4+
# Set to true to add assignees to pull requests
5+
addAssignees: author
6+
7+
# A list of reviewers to be added to pull requests (GitHub user name)
8+
reviewers:
9+
- angrymaciek

.github/issue_open_comment.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Hey @{{ .author }},
2+
3+
Thanks for taking interest in the project and the effort to help us improve it :+1:
4+
Project lead will probably come around and assign proper labels shortly...
5+
6+
Actually... maybe you would like to work on this issue yourself?
7+
You may start with reading our [contributing instructions](https://github.com/AngryMaciek/hypercomplex/blob/master/CONTRIBUTING.md).
8+
9+
<br>
10+
11+
## Your help is much appreciated!
12+
![gif](https://nypost.com/wp-content/uploads/sites/2/2019/07/meme.gif)

.github/pr_open_comment.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Dear @{{ .author }},
2+
3+
It is our utmost pleasure to receive your glorious PR to our humble codebase.
4+
You may kick back & relax for now. Our team will be with you shortly...
5+
6+
---
7+
8+
<br>
9+
<p align="center">
10+
<img src="https://media.tenor.com/G6j8e1Ql0DsAAAAM/cats-cat.gif">
11+
<br><br>
12+
<b>Fig 1.</b> Typical <i>GitHub</i> repo: PR assignee & a reviewer arguing over typos.
13+
</p>

.github/workflows/draft-pdf.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ jobs:
66

77
paper:
88
runs-on: ubuntu-22.04
9-
name: Paper Draft
109

1110
steps:
1211

.github/workflows/issue-open.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: issue-open
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
9+
issue-open-comment:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
14+
- name: Checkout the codebase
15+
uses: actions/checkout@v3
16+
17+
- name: Render comment template
18+
id: render_template
19+
uses: chuhlomin/[email protected]
20+
with:
21+
template: .github/issue_open_comment.md
22+
vars: |
23+
author: ${{ github.event.issue.user.login }}
24+
25+
- name: Create a bot comment
26+
uses: peter-evans/create-or-update-comment@v3
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
repository: AngryMaciek/hypercomplex
30+
issue-number: ${{ github.event.issue.number }}
31+
body: ${{ steps.render_template.outputs.result }}

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ name: cpplint
33
on: [push]
44

55
jobs:
6+
67
cpplint:
78
runs-on: ubuntu-22.04
89

910
steps:
1011

1112
- name: Checkout Repository
12-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1314

1415
- name: Install cpplint
1516
run: pip install cpplint

.github/workflows/pr-open.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: pr-open
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
9+
pr-open-comment:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
14+
- name: Checkout the codebase
15+
uses: actions/checkout@v3
16+
17+
- name: Delay
18+
run: sleep 30s
19+
20+
- name: Render comment template
21+
id: render_template
22+
uses: chuhlomin/[email protected]
23+
with:
24+
template: .github/pr_open_comment.md
25+
vars: |
26+
author: ${{ github.event.pull_request.user.login }}
27+
28+
- name: Create a bot comment
29+
uses: peter-evans/create-or-update-comment@v3
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
repository: AngryMaciek/hypercomplex
33+
issue-number: ${{ github.event.pull_request.number }}
34+
body: ${{ steps.render_template.outputs.result }}
35+
36+
assignee-reviewer:
37+
runs-on: ubuntu-22.04
38+
39+
steps:
40+
41+
- uses: kentaro-m/[email protected]
42+
with:
43+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ jobs:
4747

4848
version-bump-label:
4949
runs-on: ubuntu-22.04
50-
env:
51-
LABEL: ""
5250

5351
steps:
5452

5553
- name: Checkout Code
56-
uses: actions/checkout@v2
54+
uses: actions/checkout@v3
5755
with:
5856
fetch-depth: 0
5957
token: ${{ secrets.CHANGELOG_TOKEN }}
@@ -64,8 +62,10 @@ jobs:
6462
NEW_COMMIT_VERSION="$(cat hypercomplex/VERSION | grep -oE '[0-9.]+')"
6563
$GIT checkout HEAD~1
6664
PREVIOUS_COMMIT_VERSION="$(cat hypercomplex/VERSION | grep -oE '[0-9.]+')"
65+
echo PREVIOUS_COMMIT_VERSION $PREVIOUS_COMMIT_VERSION
66+
echo NEW_COMMIT_VERSION $NEW_COMMIT_VERSION
6767
$GIT checkout -
68-
if [[ "$NEW_COMMIT_VERSION" !== "$PREVIOUS_COMMIT_VERSION" ]]
68+
if [[ "$NEW_COMMIT_VERSION" != "$PREVIOUS_COMMIT_VERSION" ]]
6969
then
7070
IFS='.' read -r NEW_MAJOR NEW_MINOR NEW_PATCH <<< "$NEW_COMMIT_VERSION"
7171
IFS='.' read -r PREVIOUS_MAJOR PREVIOUS_MINOR PREVIOUS_PATCH <<< "$PREVIOUS_COMMIT_VERSION"

0 commit comments

Comments
 (0)