-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from mhitza/repo-ansible-1730131178
chore: repo-ansible run
- Loading branch information
Showing
16 changed files
with
305 additions
and
91 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
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,8 +1,10 @@ | ||
#!/usr/bin/bash | ||
|
||
temporary_file=$(mktemp) | ||
composer-unused --no-progress --output-format=github > $temporary_file | ||
# Temporary workaround on issue reported in #8432 | ||
# shellcheck disable=2024 | ||
sudo composer-unused --no-progress --output-format=github > "$temporary_file" | ||
exit_code=$? | ||
|
||
cat $temporary_file | grep -v 'ignored' | ||
grep -v 'ignored' "$temporary_file" | ||
exit $exit_code |
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,12 +1,15 @@ | ||
#!/usr/bin/env bash | ||
# Managed by https://github.com/linkorb/repo-ansible. Manual changes will be overwritten. | ||
|
||
# Workaround for recent Python versions which prevent global pip package installation without an explicit flag | ||
# or removal of a certain file. | ||
sudo rm /usr/lib/python3.*/EXTERNALLY-MANAGED || true | ||
|
||
git config commit.template .devcontainer/git/linkorb_commit.template | ||
|
||
cp .devcontainer/git/hooks/pre-push .git/hooks/pre-push | ||
chmod +x .git/hooks/pre-push | ||
|
||
composer config --global --auth http-basic.repo.packagist.com "$GITHUB_USER" "$PACKAGIST_TOKEN" | ||
|
||
composer install | ||
|
||
|
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,10 @@ | ||
#!/usr/bin/env bash | ||
# Managed by https://github.com/linkorb/repo-ansible. Manual changes will be overwritten. | ||
|
||
# pre-push composer-unused hook disabled. See Card #8980 | ||
if [ -f .git/hooks/pre-push ]; then | ||
diff .devcontainer/git/hooks/pre-push .git/hooks/pre-push | ||
if [ $? -eq 0 ]; then | ||
rm .git/hooks/pre-push | ||
fi | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Managed by https://github.com/linkorb/repo-ansible. Manual changes will be overwritten. | ||
name: Review | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, edited, reopened, synchronize] | ||
workflow_call: | ||
|
||
jobs: | ||
commit-conventions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# interesting alternative: https://github.com/cocogitto/cocogitto | ||
- name: Conventional commit checker | ||
uses: webiny/[email protected] | ||
# XXX: normal action versioning syntax (`@v1`) doesn't work with this action, | ||
# possibly because not published on the GitHub marketplace | ||
|
||
- name: Check Card# reference | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
# Matches lines that end in a card number: #1234 | ||
# Matches lines that end in a card number and PR reference: #1234 (#20) | ||
pattern: '#\d{4}(\s+\(#\d+\))?' | ||
flags: 'gm' | ||
error: 'Your commit message has to end with a card number like "#1234".' | ||
excludeDescription: 'true' # optional: this excludes the description body of a pull request | ||
excludeTitle: 'true' # optional: this excludes the title of a pull request | ||
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request | ||
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true | ||
|
||
- name: Check Line Length | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.{0,50}$' | ||
error: 'The maximum line length of 50 characters is exceeded.' | ||
excludeDescription: 'true' # optional: this excludes the description body of a pull request | ||
excludeTitle: 'true' # optional: this excludes the title of a pull request | ||
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request | ||
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true | ||
|
||
- name: Check Body Length | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.{0,72}$' | ||
error: 'The maximum line length of 72 characters is exceeded in the body.' | ||
excludeDescription: 'false' # optional: this excludes the description body of a pull request | ||
excludeTitle: 'true' # optional: this excludes the title of a pull request | ||
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request | ||
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env sh | ||
if [ -z "$husky_skip_init" ]; then | ||
debug () { | ||
if [ "$HUSKY_DEBUG" = "1" ]; then | ||
echo "husky (debug) - $1" | ||
fi | ||
} | ||
|
||
readonly hook_name="$(basename -- "$0")" | ||
debug "starting $hook_name..." | ||
|
||
if [ "$HUSKY" = "0" ]; then | ||
debug "HUSKY env variable is set to 0, skipping hook" | ||
exit 0 | ||
fi | ||
|
||
if [ -f ~/.huskyrc ]; then | ||
debug "sourcing ~/.huskyrc" | ||
. ~/.huskyrc | ||
fi | ||
|
||
readonly husky_skip_init=1 | ||
export husky_skip_init | ||
sh -e "$0" "$@" | ||
exitCode="$?" | ||
|
||
if [ $exitCode != 0 ]; then | ||
echo "husky - $hook_name hook exited with code $exitCode (error)" | ||
fi | ||
|
||
if [ $exitCode = 127 ]; then | ||
echo "husky - command not found in PATH=$PATH" | ||
fi | ||
|
||
exit $exitCode | ||
fi |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
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
Oops, something went wrong.