-
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
0 parents
commit 0508c9f
Showing
44 changed files
with
8,350 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,22 @@ | ||
BasedOnStyle: LLVM | ||
BreakBeforeBraces: Attach | ||
|
||
ColumnLimit: 120 # Match GitHub UI | ||
|
||
UseTab: Always | ||
TabWidth: 4 | ||
IndentWidth: 4 | ||
AccessModifierOffset: -4 | ||
ContinuationIndentWidth: 4 | ||
NamespaceIndentation: All | ||
IndentCaseLabels: false | ||
|
||
PointerAlignment: Left | ||
AlwaysBreakTemplateDeclarations: Yes | ||
SpaceAfterTemplateKeyword: false | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: WithoutElse | ||
AllowShortBlocksOnASingleLine: Always | ||
|
||
FixNamespaceComments: true | ||
ReflowComments: false |
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,27 @@ | ||
name: Regular badging sequence | ||
description: Publishes a badge based on the job status | ||
inputs: | ||
category: | ||
description: The subfolder where to group the badges | ||
required: true | ||
badges: | ||
description: A json object of label => status for all badges | ||
required: true | ||
github_token: | ||
description: The token to use to publish the changes | ||
required: false | ||
default: ${{ github.token }} | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
node ./.github/actions/badge/write-json-object.js ${{ inputs.category }} '${{ inputs.badges }}' | ||
shell: bash | ||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
publish_branch: badges | ||
publish_dir: ./badges | ||
keep_files: true | ||
user_name: "github-actions[bot]" | ||
user_email: "github-actions[bot]@users.noreply.github.com" |
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,17 @@ | ||
const fs = require('fs'); | ||
const category = process.argv[2]; | ||
const status = JSON.parse(process.argv[3]); | ||
|
||
if (!fs.existsSync("./badges")) fs.mkdirSync("./badges"); | ||
if (!fs.existsSync("./badges/" + category)) fs.mkdirSync("./badges/" + category); | ||
for (let e in status) { | ||
const path = "./badges/" + category + "/" + e; | ||
if (!fs.existsSync(path)) fs.mkdirSync(path); | ||
const ok = status[e] == "success"; | ||
fs.writeFileSync(path + "/shields.json", JSON.stringify({ | ||
"schemaVersion": 1, | ||
"label": e, | ||
"message": ok ? "Passing" : "Failing", | ||
"color": ok ? "brightgreen" : "red" | ||
})); | ||
} |
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,26 @@ | ||
name: Process Linting Results | ||
description: Add a comment to a pull request with when `git diff` present and save the changes as an artifact so they can be applied manually | ||
inputs: | ||
linter_name: | ||
description: The name of the tool to credit in the comment | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: git add --update | ||
shell: bash | ||
- id: stage | ||
#continue-on-error: true | ||
uses: Thalhammer/patch-generator-action@v2 | ||
|
||
# Unfortunately the previous action reports a failure so nothing else can run | ||
# partially a limitation on composite actions since `continue-on-error` is not | ||
# yet supported | ||
- if: steps.stage.outputs.result == 'dirty' | ||
uses: actions-ecosystem/action-create-comment@v1 | ||
with: | ||
github_token: ${{ github.token }} | ||
body: | | ||
Hello, @${{ github.actor }}! `${{ inputs.linter_name }}` had some concerns :scream: | ||
- run: exit $(git status -uno -s | wc -l) | ||
shell: bash |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
#!/bin/bash | ||
if [[ -f "$1" && -s "$1" ]]; then | ||
if [[ -n "$(tail -c 1 "$1")" ]]; then | ||
echo "Fixed missing newline in file $1" | ||
sed -i -e '$a\' $1 | ||
fi | ||
fi |
Oops, something went wrong.