-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into joerger/sso-mfa-web
- Loading branch information
Showing
77 changed files
with
1,807 additions
and
679 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
# This script is a helper that tells developers what generated content is out of date | ||
# and which command to run. | ||
# When running on GitHub actions, the script will also create an error in the PR and | ||
# collapse the diff to improve readability. | ||
|
||
set -eu | ||
|
||
# only echoes the string if we are in GitHub Actions | ||
echo_gha() { | ||
[ -n "${GITHUB_ACTIONS+x}" ] && echo "$@" | ||
} | ||
|
||
main() { | ||
if [ $# -ne 2 ]; then | ||
echo "Usage: $0 <kind> <generate command>" >&2 | ||
exit 1 | ||
fi | ||
|
||
KIND="$1" | ||
GENERATE_COMMAND="$2" | ||
|
||
TITLE="$KIND are out-of-date" | ||
MESSAGE="Please run the command \`$GENERATE_COMMAND\`" | ||
|
||
# Create a GitHub error | ||
echo_gha "::error file=Makefile,title=$TITLE::$MESSAGE" | ||
|
||
echo "=============" | ||
echo "$TITLE" | ||
echo "$MESSAGE" | ||
echo "=============" | ||
|
||
echo_gha "::group::Diff output" | ||
git diff || true | ||
echo_gha "::endgroup::" | ||
} | ||
|
||
main "$@" |
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.