Skip to content
Open
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: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog

## 3.1.0
## Unreleased

### Dependencies

- Bump Workflow args test script from latest to v3.1.0 ([#135](https://github.com/getsentry/github-workflows/pull/135))
- [changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md#310)
- [diff](https://github.com/getsentry/github-workflows/compare/latest...3.1.0)

## 2.14.0

### Features

Expand Down
16 changes: 1 addition & 15 deletions updater/tests/workflow-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,7 @@ set -euo pipefail

case $1 in
get-version)
# Return the actual latest tag to ensure no update is needed
# Always use remote lookup for consistency with update-dependency.ps1
tags=$(git ls-remote --tags --refs https://github.com/getsentry/github-workflows.git | \
sed 's/.*refs\/tags\///' | \
grep -E '^v?[0-9.]+$')

# Sort by version number, handling mixed v prefixes
latest=$(echo "$tags" | sed 's/^v//' | sort -V | tail -1)

# Check if original had v prefix and restore it
if echo "$tags" | grep -q "^v$latest$"; then
echo "v$latest"
else
echo "$latest"
fi
echo "3.1.0"

Choose a reason for hiding this comment

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

Potential bug: The test script workflow-args.sh hardcodes a version number, which will cause the updater-no-changes test to fail when a new version is released.
  • Description: The get-version case in updater/tests/workflow-args.sh hardcodes the version as "3.1.0". The updater-no-changes test compares this hardcoded value against the latest tag fetched from the getsentry/github-workflows repository. When a new version of the repository is released (e.g., 3.2.0), the test will fail because the hardcoded version will no longer match the latest tag. This will cause CI to fail on every push, blocking development until the version in the script is manually updated.

  • Suggested fix: Instead of hardcoding the version in workflow-args.sh, dynamically determine the current version. This could involve parsing the version from a file that is automatically updated, or refactoring the test to not depend on a specific version number.
    severity: 0.65, confidence: 0.98

Did we get this right? 👍 / 👎 to inform future reviews.


# Run actual tests here.
if [[ "$(uname)" != 'Darwin' ]]; then
Expand Down