Transifex-integration bot is immediately closing its unmerged pull requests

The transifex-integration bot is creating pull requests in our Github repository, but then immediately closing them.

Project: Beyond All Reason Transifex Github integration

Github Integration Settings:

Workflow:

  1. Changes to English source files committed to master branch
  2. Weekly Github action force rebases branch transifex-synchronization-source from master
  3. Transifex uses transifex-synchronization-source as source branch
  4. Translation work done
  5. Transifex creates pull request against transifex-synchronization-source
  6. Github action changes pull request merge target to master
  7. Pull request is merged to master

Issue: The Transifex bot is automatically closing the pull requests created in step 5.

Examples:

  1. PR #3286: PR opened, merge target changed, bot immediately closes PR and deletes branch
  2. PR #3287: PR opened, merge target changed, bot closes PR 32 minutes later, does not delete branch (also note the translation file in the description is not actually the one in the PR)
  3. PR #3288: PR opened and immediately closed, before the Github action even has a chance to change the merge target, does not delete branch
  4. [Counterexample] PR #3089: This is an older PR from a month earlier, everything worked properly, same language as the other PRs

Hypothesis:
The bot treats pull requests as stateless, so rather than tracking PR#12345 as the “true” PR, it only looks for a PR merging the translation files to the source branch transifex-synchronization-source. Thus it sees the PRs with a merge target of master as incorrect, and closes them.

This would explain it closing the pull requests, and why it is not grouping multiple files in the PR as per the project settings. However, in example #3 it closed the PR even though the merge target wasn’t changed, and in example #4 the exact same workflow was previously successful.

Update:
The bot is closing the pull requests when another resource has been fully reviewed, creating a new pull request instead of updating the existing one.

  1. Resource A fully reviewed
  2. Bot opens pull request A with resource A
  3. Github action changes merge target
  4. Resource B fully reviewed
  5. Bot closes pull request A
  6. Bot deletes branch from pull request A
  7. Bot creates pull request B with resource B

Example:
PR #3356: Pull request for Russian resource units.json
PR #3357: Pull request for Russian resource interface.json

Instead of appending interface.json to #3356, it creates #3357 as a separate PR, and for some reason closes #3356.

Thank you for your patience and for bringing this issue to our attention - I apologize for the delay in responding.

Our support team is currently looking into the unexpected behavior of the Transifex-integration bot closing pull requests.

We appreciate the details you’ve provided, and we’ll make sure that you’re updated as soon as we have a solution!

Hello,
I am Christos from Transifex support team.
I have made some tests in your original workflow.

  1. Changes to English source files committed to master branch
  2. Weekly Github action force rebases branch transifex-synchronization-source from master
  3. Transifex uses transifex-synchronization-source as source branch
  4. Translation work done
  5. Transifex creates pull request against transifex-synchronization-source
  6. Github action changes pull request merge target to master
  7. Pull request is merged to master

When I follow this specific workflow everything works as expected. Please see attached image.

Transifex bot never closed the PR that was opened due to the rebase action of the pull request.

I am trying to look into the second workflow you mentioned in your update.