Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/bash/repo-sizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# - ./script.sh <path/to/scan>
#
# Script will scan that directory for size and
# files with extensions that could be ommitted
# files with extensions that could be omitted
#

########
Expand Down Expand Up @@ -98,7 +98,7 @@ GetRepoSize()
# Grab the current size of the repository on disk
SIZE=($(du -sh $DIR_TO_SCAN))

# Print the size thats cleaned up
# Print the size that's cleaned up
echo "Total size of repository on disk:[$SIZE]"
}
################################################################################
Expand Down
6 changes: 3 additions & 3 deletions pre-receive-hooks/block-outdated-clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
# $ sh git_hook_outdated_clients.sh
# ```
#
# Edit this variables to set the policy for the git version
# Edit these variables to set the policy for the git version
#
# max_minor_diff: the number of git versions allowed from the latest one.
# block_list: a list containing specific versions that are blocked by policy
max_minor_diff=3
block_list=(
)

# Edit this variables to get the right version to compare as latest
# Edit these variables to get the right version to compare as latest
# latest_version: add the latest version to check or leave it empty to let the script get it dynamically
# authentication: provide a PAT on the environment if you want to execute the request to get the version without triggering the rate limit.
# If you don't provide the latest version we strongly recommend to add a GH_TOKEN to the environment. It requires jq as dependency
Expand All @@ -45,7 +45,7 @@ function block_version {
echo "## Outdated git version $1 ##"
echo "#########################################"
echo ""
echo "Update the git version to a newest one: https://git-scm.com/downloads"
echo "Update the git version to a newer one: https://git-scm.com/downloads"

exit 1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

#
# Pre-receive hook that will block any new commits that their names do not being with the userID
# Pre-receive hook that will block any new commits that their names do not begin with the userID
#
# More details on pre-receive hooks and how to apply them can be found on
# https://help.github.com/enterprise/admin/guides/developer-workflow/managing-pre-receive-hooks-on-the-github-enterprise-appliance/
Expand Down
2 changes: 1 addition & 1 deletion pre-receive-hooks/block_confidentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ regex_list=(
'(\-){5}BEGIN\s?(RSA|OPENSSH|DSA|EC|PGP)?\s?PRIVATE KEY\s?(BLOCK)?(\-){5}.*'
# block AWS API Keys
'AKIA[0-9A-Z]{16}'
# block AWS Secret Access Key (TODO: adjust to not find validd Git SHA1s; false positives)
# block AWS Secret Access Key (TODO: adjust to not find valid Git SHA1s; false positives)
# '([^A-Za-z0-9/+=])?([A-Za-z0-9/+=]{40})([^A-Za-z0-9/+=])?'
# block confidential content
'CONFIDENTIAL'
Expand Down
2 changes: 1 addition & 1 deletion pre-receive-hooks/block_unsigned_commits.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

#
# Pre-receive hook that will block any unsigned commits and tagswhen pushed to a GitHub Enterprise repository
# Pre-receive hook that will block any unsigned commits and tags when pushed to a GitHub Enterprise repository
# The script will not actually validate the GPG signature (would need access to PKI)
# but just checks whether all new commits and tags have been signed
#
Expand Down