chore(grafana-annotation): remove usage of archived action#300
Open
MrkMrk00 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the archived hexionas/grafana-annotation-action usage in the reusable Grafana annotation workflow with an inline Bash implementation that calls Grafana’s annotations API directly.
Changes:
- Replaced the third-party Grafana annotation GitHub Action with a
curl-based Bash step. - Added logic to
POST(create) orPATCH(update) an annotation based on whether an annotation ID is provided. - Normalized workflow-call output wiring/indentation for
annotation_id.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a04da53 to
a221104
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
.github/workflows/grafana_annotation.yaml:83
echo "annotation-id=..." >> "$GITHUB_OUTPUT"uses a hyphenated output name. To keep output naming consistent (and to match theannotation_idjob/workflow outputs), writeannotation_id=...instead and update references accordingly.
if [[ "$method" == 'POST' ]]; then
id=$(jq -r '.id' <<< "$response")
echo "annotation-id=$id" >> "$GITHUB_OUTPUT"
else
echo "annotation-id=$GRAFANA_ANNOTATION_ID" >> "$GITHUB_OUTPUT"
fi
fix(grafana-annotation): correct curl URL, payload key, PATCH semantics and tag parsing - Pass $endpoint to curl (was missing — every request failed with "no URL specified") - Fix "test" → "text" so the annotation text is actually stored - PATCH now updates only timeEnd (mirrors the archived action's close-out behaviour) - Build JSON body with jq (escapes text correctly, removes injection vector) - Parse newline-separated tags with `jq -Rn` so plain-string tags work - Drop `set -x` so the Authorization header isn't xtraced - `jq -r '.id'` for unquoted output, quote $GITHUB_OUTPUT
a221104 to
3a0664a
Compare
fnesveda
approved these changes
May 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Grafana Annotation action has been archived https://github.com/hexionas/grafana-annotation-action/. This PR re-implements the annotation creation in a few lines of Bash.
The source for the old action: https://github.com/hexionas/grafana-annotation-action/blob/main/index.ts