Skip to content
Merged
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
10 changes: 6 additions & 4 deletions .github/actions/predict-next-version/git_predict_next_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ git fetch

function get_logs() {
if [ "$GIT_LOGS" == "" ]; then
git log origin/main..
git log $(git merge-base HEAD origin/main)..HEAD
else
echo "$GIT_LOGS"
fi
}

BREAKING_CHANGES="$(get_logs | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(get_logs | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(get_logs | grep "^\s*fix[(:]")"
GIT_LOGS="$(get_logs)"

BREAKING_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*fix[(:]")"

function print_changes() {
local title=$1
Expand Down
10 changes: 6 additions & 4 deletions .github/actions/tag-jira-release/git_predict_next_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ git fetch

function get_logs() {
if [ "$GIT_LOGS" == "" ]; then
git log ${TARGET_BRANCH}..
git log $(git merge-base HEAD ${TARGET_BRANCH})..HEAD
else
echo "$GIT_LOGS"
fi
}

BREAKING_CHANGES="$(get_logs | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(get_logs | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(get_logs | grep "^\s*fix[(:]")"
GIT_LOGS="$(get_logs)"

BREAKING_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*fix[(:]")"

function print_changes() {
local title=$1
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/tag-jira-release/ticket_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ CURRENT_BRANCH=$1
if [ "$CURRENT_BRANCH" == "" ]; then
echo "Usage: [current_branch] [(optional) target_branch]"
exit 1
elif [ "$CURRENT_BRANCH" == "." ]; then
CURRENT_BRANCH=$(git branch --show-current)
fi
TARGET_BRANCH=main
if [ "$2" != "" ]; then
TARGET_BRANCH=$2
fi

HASHES=$(git log $TARGET_BRANCH..$CURRENT_BRANCH --pretty=format:'%H')
COMMON_BRANCH=$(git merge-base $TARGET_BRANCH $CURRENT_BRANCH)
HASHES=$(git log $COMMON_BRANCH..$CURRENT_BRANCH --pretty=format:'%H')

if [ ! -d ~/temp ]; then
mkdir ~/temp
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tag-tickets-with-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
- name: create prompt
id: create_prompt
run: |
DIFF="$(git log --pretty=format:'%s' ${TARGET_BRANCH}..HEAD)"
COMMON_BRANCH=$(git merge-base HEAD ${TARGET_BRANCH})
DIFF="$(git log --pretty=format:'%s' ${COMMON_BRANCH}..HEAD)"
LLM_PROMPT_PREFIX="Create a fun release description in 100 characters or less in one line without identifiers for the following data:
"
LLM_PROMPT="$LLM_PROMPT_PREFIX$DIFF"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-actions",
"version": "2.5.1",
"version": "2.5.2",
"description": "Used to store GitHub actions for use across the enterprise",
"scripts": {
"test": "./tooling/scripts/run_tests.sh",
Expand Down
10 changes: 6 additions & 4 deletions tooling/scripts/git_predict_next_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ git fetch

function get_logs() {
if [ "$GIT_LOGS" == "" ]; then
git log origin/main..
git log $(git merge-base HEAD origin/main)..HEAD
else
echo "$GIT_LOGS"
fi
}

BREAKING_CHANGES="$(get_logs | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(get_logs | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(get_logs | grep "^\s*fix[(:]")"
GIT_LOGS="$(get_logs)"

BREAKING_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*BREAKING CHANGE:")"
MINOR_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*feat[(:]")"
PATCH_CHANGES="$(echo "$GIT_LOGS" | grep "^\s*fix[(:]")"

function print_changes() {
local title=$1
Expand Down
Loading