-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add label event #18
add label event #18
Conversation
function label_event_envs() { | ||
LABEL_COUNT=$(gh label list --json name --jq length) | ||
if [ "${LABEL_COUNT}" == "0" ]; then | ||
LABEL_COLOR="d73a4a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LABEL_COUNT=$(gh label list --json name --jq length) | ||
if [ "${LABEL_COUNT}" == "0" ]; then | ||
LABEL_COLOR="d73a4a" | ||
LABEL_DESCRIPTION="gh-act label" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ "${LABEL_COUNT}" == "0" ]; then | ||
LABEL_COLOR="d73a4a" | ||
LABEL_DESCRIPTION="gh-act label" | ||
LABEL_NODE_ID="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LABEL_COLOR="d73a4a" | ||
LABEL_DESCRIPTION="gh-act label" | ||
LABEL_NODE_ID="" | ||
LABEL_IS_DEFAULT="false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LABEL_DESCRIPTION="gh-act label" | ||
LABEL_NODE_ID="" | ||
LABEL_IS_DEFAULT="false" | ||
LABEL_NAME="gh act" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACT_ENV="${TEMPFILE_DIR}/.label.env" | ||
gh label list --json \ | ||
color,description,id,isDefault,name,url \ | ||
--template ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LABEL_NAME="{{$label.name}}" | ||
LABEL_URL="{{$label.url}}" | ||
' | filter_env > "${ACT_ENV}" | ||
. "${ACT_ENV}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -366,6 +395,9 @@ function create_event_json() { | |||
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%B%-" | sed -e 's/$/\\\\n/g' | tr -d '\n' | sed -e 's/\\\\n$//g') | |||
COMMITS=$(git log -1 --pretty=format:"{%n \"author\": {%n \"email\": \"%ae\",%n \"name\":\"%an\",%n \"username\":\"%an\"%n },%n \"committer\":{%n \"email\":\"%ce\",%n \"name\":\"%cn\",%n \"username\":\"%cn\"%n },%n \"distinct\":true,%n \"id\":\"%H\",%n \"message\":\"${COMMIT_MESSAGE}\",%n \"timestamp\":\"%cI\",%n \"tree_id\":\"%T\",%n \"url\":\"https://${GITHUB_HOSTNAME}/${OWNER}/${REPO}/commit/%H\"%n}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -366,6 +395,9 @@ function create_event_json() { | |||
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%B%-" | sed -e 's/$/\\\\n/g' | tr -d '\n' | sed -e 's/\\\\n$//g') | |||
COMMITS=$(git log -1 --pretty=format:"{%n \"author\": {%n \"email\": \"%ae\",%n \"name\":\"%an\",%n \"username\":\"%an\"%n },%n \"committer\":{%n \"email\":\"%ce\",%n \"name\":\"%cn\",%n \"username\":\"%cn\"%n },%n \"distinct\":true,%n \"id\":\"%H\",%n \"message\":\"${COMMIT_MESSAGE}\",%n \"timestamp\":\"%cI\",%n \"tree_id\":\"%T\",%n \"url\":\"https://${GITHUB_HOSTNAME}/${OWNER}/${REPO}/commit/%H\"%n}") | |||
fi | |||
if [ "${EVENT_NAME}" == "label" ]; then | |||
label_event_envs | |||
fi | |||
HEAD=$(git rev-parse HEAD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -366,6 +395,9 @@ function create_event_json() { | |||
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%B%-" | sed -e 's/$/\\\\n/g' | tr -d '\n' | sed -e 's/\\\\n$//g') | |||
COMMITS=$(git log -1 --pretty=format:"{%n \"author\": {%n \"email\": \"%ae\",%n \"name\":\"%an\",%n \"username\":\"%an\"%n },%n \"committer\":{%n \"email\":\"%ce\",%n \"name\":\"%cn\",%n \"username\":\"%cn\"%n },%n \"distinct\":true,%n \"id\":\"%H\",%n \"message\":\"${COMMIT_MESSAGE}\",%n \"timestamp\":\"%cI\",%n \"tree_id\":\"%T\",%n \"url\":\"https://${GITHUB_HOSTNAME}/${OWNER}/${REPO}/commit/%H\"%n}") | |||
fi | |||
if [ "${EVENT_NAME}" == "label" ]; then | |||
label_event_envs | |||
fi | |||
HEAD=$(git rev-parse HEAD) | |||
BEFORE=$(git rev-parse HEAD^) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.