Skip to content

Commit 1909e95

Browse files
♻️ Simplify update dependencies workflow checks (#85)
Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 458753e commit 1909e95

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/update_dependencies.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,16 @@ jobs:
9797
EXISTING_PR=$(gh pr list --search "in:title Update dependencies is:open label:automated-dependencies-update" --json headRefName,number,author -q '.[0]')
9898
9999
if [ -n "$EXISTING_PR" ]; then
100-
# Multiple validation checks before using an existing branch
100+
# Check if PR has our automation label
101101
BRANCH_NAME=$(echo $EXISTING_PR | jq -r .headRefName)
102-
PR_AUTHOR=$(echo $EXISTING_PR | jq -r .author.login)
103102
104-
if [[ "$PR_AUTHOR" == "github-actions[bot]" && "$BRANCH_NAME" == update-dependencies-* ]]; then
105-
echo "Found valid PR with branch $BRANCH_NAME by github-actions[bot]. Updating it."
103+
if [[ "$BRANCH_NAME" == update-dependencies-* ]]; then
104+
echo "Found valid automated PR with branch $BRANCH_NAME. Updating it."
106105
git checkout -B $BRANCH_NAME
107106
commit_changes
108107
git push -f origin $BRANCH_NAME
109108
else
110-
echo "Found PR but it's not from our bot or wrong branch pattern. Creating new branch."
109+
echo "Found PR but wrong branch pattern. Creating new branch."
111110
NEW_BRANCH="update-dependencies-${{ github.run_id }}"
112111
git checkout -b $NEW_BRANCH
113112
commit_changes

0 commit comments

Comments
 (0)