gruntwork-io / gruntwork-io/git-xargs

git-xargs doesn't update existing PRs

Open
#109 1 comment 5 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
1.1k
Forks
75
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
First of all, I recently discovered this amazing tool and I've used it to open a bunch of PRs across a few repos. That worked amazingly!

Now I got some review feedback and I'm trying to update those PRs by using git-xargs again. Here's what I did:

```
git-xargs \
--branch-name "test-branch1" \
--commit-message "Upgrade jira-description-action to use node16" \
--repos ~/repos.txt \
--pull-request-title "SINF-522 Upgrade jira-description-action to use node16" \
--pull-request-description "Because the latest version uses node 16" \
--loglevel DEBUG \
/tmp/2.sh
```

The intention is that I want git-xargs to run `/tmp/2.sh` to addresses the feedback on the existing PR branch(es) and push the changes. That's the behavior of git-xargs when the branch already exists. However, git-xargs seems to ignore the existing remote branch and creates a new local branch with the same name. When it tries to push the branch to remote, it will report this error:

`Error="non-fast-forward update"`

Why is git-xargs not making changes to the existing branch?

**To Reproduce**
See above

```hcl
// paste code snippets here
```

**Expected behavior**
git-xargs should make changes to the existing branch.

**Nice to have**
- [ ] Terminal output
- [ ] Screenshots

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.