Closed tinogo closed 10 months ago
Hi @tinogo,
The Action will fill the pull_request_url
only in the case when it actually creates a new PR (https://github.com/crowdin/github-action/blob/master/entrypoint.sh#L139)
In other cases, the value of this output will remain empty (https://github.com/crowdin/github-action/blob/master/entrypoint.sh#L4)
Hi @andrii-bodnar,
thank you for your reply - really appreciate that! :)
While debugging this a little more, I think that I've found the error:
In the cases, where the pull_request_url
is supposed to be empty, it actually seems to contain two single-quotes, i.e. ''
.
See the screenshot of my workflow run:
The ''
is the value of the pull_request_url
. If it would be really empty, the added if
-expressions of some of my workflow-steps wouldn't execute (like if: ${{ steps.crowdin-download.outputs.pull_request_url && needs.set-parameters.outputs.branch-name == inputs.repo_default_branch }}
, as an empty string/value for a step-output should evaluate to false
).
Edit: I've just supplied a pull-request, which should fix the issue (but haven't tested it).
@tinogo thanks a lot for your investigation! 🚀
I've already merged your PR, could you please try if it works before the release by specifying the commit hash as a version:
uses: crowdin/github-action@195e70c077744813cd72a7c439c7acac98131239
Thank you!
@andrii-bodnar Awesome - looks good now:
@tinogo great, thank you for the quick feedback! 🙌
Releasing a new version
@tinogo Would you mind if I used some of your workflow to enhance the usage examples? https://github.com/crowdin/github-action/blob/master/EXAMPLES.md
@andrii-bodnar Of course you can use them. 🙂
First of all: Thank you for adding the "pull_request_url"-output to the Crowdin-Github-Action. It made our Crowdin-Download-Workflow much easier to maintain, as we need to fetch the corresponding Pull Request for ourselves anymore. :)
Describe the bug But we still stumbled upon a small bug/annoyance:
The bug now is:
To Reproduce Steps to reproduce the behavior:
Reusable Workflow:
Scheduled workflow:
crowdin.yml
file contentExpected behavior When the Crowdin Action detects, that there are no translation changes: ...it either should leave the "pull_request_url"-output empty or provide another output, which states, that a PR for this localization branch already exists.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.