Skip to content

Conversation

@bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Dec 1, 2025

No description provided.

@bnbarham
Copy link
Contributor Author

bnbarham commented Dec 2, 2025

CC @TTOzzi

Copy link
Member

@TTOzzi TTOzzi left a comment

Choose a reason for hiding this comment

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

Ah… I just tested the changes reflecting the comments I left earlier.
It turns out that modifying workflow files requires the workflows:write permission, and the default GitHub Actions token can’t be granted that permission.
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions

It seems this won’t work unless we use a personal access token with workflow permissions.
I didn’t realize this wasn’t possible — sorry about that 😭

exit 0
fi
sed -i "s/base_branch: .*/base_branch: $RELEASE_BRANCH/" "$FILE"
Copy link
Member

Choose a reason for hiding this comment

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

Since $RELEASE_BRANCH contains a slash (e.g. release/**), I think we should switch the delimiter to | to avoid conflicts.

Suggested change
sed -i "s/base_branch: .*/base_branch: $RELEASE_BRANCH/" "$FILE"
sed -i "s|base_branch:.*|base_branch: $RELEASE_BRANCH|" "$FILE"

git config user.email "[email protected]"
git add Sources/swift-format/PrintVersion.swift
git commit -m "Update version to $VERSION"
git push origin $UPDATE_BRANCH
Copy link
Member

Choose a reason for hiding this comment

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

I explicitly added only PrintVersion.swift, so we should change this 🫣

@bnbarham
Copy link
Contributor Author

bnbarham commented Dec 2, 2025

It seems this won’t work unless we use a personal access token with workflow permissions.
I didn’t realize this wasn’t possible — sorry about that 😭

Ah bummer, that's unfortunate :( No need to be sorry, thanks for checking!

@bnbarham bnbarham closed this Dec 2, 2025
@bnbarham bnbarham deleted the auto-update-automerge branch December 2, 2025 21:04
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