Skip to content
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

chore(updatecli) fix crl issue creation #386

Merged
merged 1 commit into from
Feb 11, 2025
Merged
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
7 changes: 4 additions & 3 deletions updatecli/scripts/createIssue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ set -eux -o pipefail

command -v "gh" >/dev/null 2>&1 || { echo "ERROR: gh command not found. Exiting."; exit 1; }

cmd=$(cat <<- EOM
cmd=$(cat <<-EOM
gh issue create --title "[private.vpn.jenkins.io] $1 VPN CRL expires" \
--body "follow https://github.com/jenkins-infra/docker-openvpn?tab=readme-ov-file#howto-renew-certificate-revocation-list \
See https://github.com/jenkins-infra/helpdesk/issues/4266 for details." \
--label crl \
--label updatecli \
--label triage \
--repo jenkins-infra/helpdesk
EOM
)

if test "$DRY_RUN" == "false"
if test "${DRY_RUN:=true}" == "false"
then
export GITHUB_TOKEN="${UPDATECLI_GITHUB_TOKEN}"
alreadyOpened=$(gh issue list --repo jenkins-infra/helpdesk --state open --search "label:crl label:updatecli" | wc -l)
if test "$alreadyOpened" -eq 0
then
"${cmd}"
eval "${cmd}"
else
echo "issue already opened"
fi
Expand Down