-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
407 additions
and
182 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,19 @@ | ||
#!/bin/sh | ||
|
||
commit_message=$(<"$1") | ||
|
||
if ! [[ $commit_message =~ ^(vingo:|vinscant:|vinvoor:|zess:) ]]; then | ||
echo "Error: commit message should start with vingo:|vinscant:|vinvoor:|zess: depending on which subproject you are working on." | ||
exit 1 | ||
fi | ||
|
||
if ! [[ $commit_message =~ ^.*:\ [a-z].* ]]; then | ||
echo "Error: first letter after project specifier should be lower case | ||
Example: | ||
vingo: add cheese | ||
^ | ||
| this one" | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
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,33 @@ | ||
name: commit message check | ||
run-name: commit message check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull-request: | ||
|
||
jobs: | ||
check_commit_messages: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: check commit messages | ||
run: | | ||
git log --format="%s" origin/main..HEAD | while IFS= read -r message; do | ||
if ! [[ $message =~ ^(vingo:|vinscant:|vinvoor:|zess:) ]]; then | ||
echo $message | ||
echo "Error: commit message should start with vingo:|vinscant:|vinvoor:|zess: depending on which subproject you are working on." | ||
exit 1 | ||
fi | ||
if ! [[ $message =~ ^.*:\ [a-z].* ]]; then | ||
echo $message | ||
echo "Error: first letter after project specifier should be lower case" | ||
exit 1 | ||
fi | ||
done |
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
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
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 |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<div class="box"> | ||
<form action="/cards/register" method="post"> | ||
<div> | ||
If you don't have any cards yet, click the button below to start registering a new card. | ||
If you don't have any cards yet, click the button below to start registering a new card.<br/> | ||
Once clicked, you will have 1 minute to scan the card you want to use at the scanner and it will be linked to your account. | ||
</div> | ||
<div class="field is-grouped is-grouped-right"> | ||
{{if .registering}} | ||
<div> | ||
{{ if .registering }} | ||
{{ if .reg_user }} | ||
<input class="button is-warning" disabled type="submit" value="You are registering a card!"> | ||
{{- else}} | ||
<input class="button is-danger" disabled type="submit" value="Somebody is already registering a card"> | ||
{{- end}} | ||
{{- else}} | ||
<input class="button is-success" type="submit" value="Start registering a new card"> | ||
{{- end}} | ||
<input class="warning" disabled type="submit" value="You are registering a card!"> | ||
{{ else }} | ||
<input class="danger" disabled type="submit" value="Somebody is already registering a card"> | ||
{{ end }} | ||
{{ else }} | ||
<input class="success" type="submit" value="Start registering a new card"> | ||
{{ end }} | ||
</div> | ||
</form> | ||
</div> | ||
<div class="box"> | ||
{{if .cards}} | ||
<table class="table is-fullwidth is-striped is-hoverable"> | ||
<thead> | ||
{{ if .cards }} | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>card</th> | ||
<th>created_at</th> | ||
</tr> | ||
</thead> | ||
{{ range .cards }} | ||
<tr> | ||
<th>card</th> | ||
<th>created_at</th> | ||
<td>{{ .Serial }}</td> | ||
<td>{{ .CreatedAt.Local.Format "2 January 2006 15:04:05" }}</td> | ||
</tr> | ||
</thead> | ||
{{range .cards}} | ||
<tr> | ||
<td>{{.Serial}}</td> | ||
<td>{{.CreatedAt.Local.Format "2 January 2006 15:04:05"}}</td> | ||
</tr> | ||
{{end}} | ||
</table> | ||
{{- else}} | ||
<div class="title">No cards yet!</div> | ||
{{- end}} | ||
{{ end }} | ||
</table> | ||
{{ else }} | ||
<h1>No cards yet!</h1> | ||
{{ end }} | ||
</div> |
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
<div class="title">Ono you are not logged in!</div> | ||
<h1>Ono you are not logged in!</h1> |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<div class="box"> | ||
<table class="table is-fullwidth is-striped is-hoverable"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>Name</th> | ||
<th>Total days scanned</th> | ||
</tr> | ||
</thead> | ||
{{range .leaderboard}} | ||
<tr> | ||
<td>{{.Position}}</td> | ||
<td>{{.Username}}</td> | ||
<td>{{.TotalDays}}</td> | ||
</tr> | ||
{{end}} | ||
{{ range .leaderboard }} | ||
<tr> | ||
<td>{{.Position}}</td> | ||
<td>{{.Username}}</td> | ||
<td>{{.TotalDays}}</td> | ||
</tr> | ||
{{ end }} | ||
</table> | ||
</div> |
Oops, something went wrong.