Validation failed when PR already exists #193
-
|
When running the same job twice, I get the following error: The new changes are force-pushed to the localization branch so the PR is updated correctly, but the job fails. Is there a way to configure the action so that this doesn't happen? Repo: https://github.com/joakimgunst/crowdin-test |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
|
I suppose one option is to disable the PR creation in the job and open the PR manually, but ideally I would like a PR to be created (only) if none is currently open. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @joakimgunst, It's strange because this action has the check to see if the same pull request exists in the repo - https://github.com/crowdin/github-action/blob/master/entrypoint.sh#L95-L113 Could you please try to run the workflow in debug mode? |
Beta Was this translation helpful? Give feedback.
-
|
@andrii-bodnar Here is a debug run: https://github.com/joakimgunst/crowdin-test/actions/runs/6157076960/job/16709678134 |
Beta Was this translation helpful? Give feedback.
-
|
I created this script as a test, and it prints #!/bin/sh
PULL_REQUESTS='l10n_crowdin_translations
l10n_main
renovate/configure'
BRANCH='l10n_crowdin_translations'
if echo "$PULL_REQUESTS " | grep -q "$BRANCH "; then
echo "PULL REQUEST ALREADY EXIST"
else
echo "CREATE PULL REQUEST"
fi |
Beta Was this translation helpful? Give feedback.
-
|
The pull request names are separated by newlines, and the extra whitespace after |
Beta Was this translation helpful? Give feedback.
-
|
I think if
|
Beta Was this translation helpful? Give feedback.
-
|
Or using |
Beta Was this translation helpful? Give feedback.
-
|
@joakimgunst thanks a lot for the details provided! I just prepared a possible fix, could you please check it by referencing the commit hash as the Action version? uses: crowdin/github-action@b0270b7fb2079c9421b32e30c0d88d9c06d59330 |
Beta Was this translation helpful? Give feedback.
-
|
It seems to work: https://github.com/joakimgunst/crowdin-test/actions/runs/6158980256/job/16712861357 |
Beta Was this translation helpful? Give feedback.
-
|
@joakimgunst glad to hear that! So I'm going to merge this fix and it will be available in the next Action release. Thanks for the help with the debugging! 🚀 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick response! 🙏 |
Beta Was this translation helpful? Give feedback.
@joakimgunst glad to hear that!
So I'm going to merge this fix and it will be available in the next Action release.
Thanks for the help with the debugging! 🚀