Skip to content

Conversation

@solidsnakedev
Copy link
Collaborator

  • Prioritize evolution package when it has real changes
  • Filter out releases with only dependency updates
  • Fallback to other packages if evolution has no changes

Copilot AI review requested due to automatic review settings January 26, 2026 16:44
@solidsnakedev solidsnakedev merged commit d393a10 into main Jan 26, 2026
8 checks passed
@solidsnakedev solidsnakedev deleted the fix/x-workflow-trigger-2 branch January 26, 2026 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the post-release workflow so that tweets are only sent for meaningful @evolution-sdk releases, with preference for the main evolution package. It filters out dependency-only releases and introduces a guard to skip tweeting when no qualifying release is found.

Changes:

  • Replace the simple releases/latest lookup with logic that scans recent @evolution-sdk/* releases, filters out those older than an hour or with only dependency updates, and prioritizes the @evolution-sdk/evolution package while falling back to other packages if needed.
  • Normalize the selected tag and URL into step outputs (tag, url, found) used by the tweet step.
  • Add a conditional on the tweeting step so it only runs when a qualifying release has been found.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +67 to +72
CLEAN_TAG=$(echo $EVOLUTION_TAG | sed 's/@//g')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
echo "url=$EVOLUTION_URL" >> $GITHUB_OUTPUT
echo "found=true" >> $GITHUB_OUTPUT
elif [ -n "$FALLBACK_TAG" ]; then
CLEAN_TAG=$(echo $FALLBACK_TAG | sed 's/@//g')
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sed 's/@//g' on the tag removes all @ characters, so a tag like @evolution-sdk/evolution@1.2.3 will be turned into evolution-sdk/evolution1.2.3, losing the separator between package and version. If the intent is just to avoid a leading @ (e.g. to prevent a Twitter mention) while keeping the @ before the version, this should strip only a leading @ (or otherwise preserve the package/version separator) instead of removing all occurrences.

Suggested change
CLEAN_TAG=$(echo $EVOLUTION_TAG | sed 's/@//g')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
echo "url=$EVOLUTION_URL" >> $GITHUB_OUTPUT
echo "found=true" >> $GITHUB_OUTPUT
elif [ -n "$FALLBACK_TAG" ]; then
CLEAN_TAG=$(echo $FALLBACK_TAG | sed 's/@//g')
CLEAN_TAG=$(echo $EVOLUTION_TAG | sed 's/^@//')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
echo "url=$EVOLUTION_URL" >> $GITHUB_OUTPUT
echo "found=true" >> $GITHUB_OUTPUT
elif [ -n "$FALLBACK_TAG" ]; then
CLEAN_TAG=$(echo $FALLBACK_TAG | sed 's/^@//')

Copilot uses AI. Check for mistakes.
EVOLUTION_URL=""
for i in $(seq 0 10); do
RELEASE=$(echo $RELEASES | jq ".[$i]")
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo $RELEASES | jq ... expands $RELEASES unquoted, which performs word splitting and re-flattens whitespace in the JSON before it reaches jq; while it may work in practice, it is fragile and can break with larger or more complex JSON payloads. To make this more robust, pass the JSON to jq without word splitting (for example by quoting $RELEASES or using printf), so the data structure is preserved exactly as returned by gh api.

Suggested change
RELEASE=$(echo $RELEASES | jq ".[$i]")
RELEASE=$(printf '%s\n' "$RELEASES" | jq ".[$i]")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants