Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to backport pulls with empty description (i.e. body) #175

Closed
mjlbach opened this issue Oct 20, 2021 · 3 comments · Fixed by #188
Closed

Unable to backport pulls with empty description (i.e. body) #175

mjlbach opened this issue Oct 20, 2021 · 3 comments · Fixed by #188
Labels
bug Something isn't working

Comments

@mjlbach
Copy link

mjlbach commented Oct 20, 2021

Hi!

I'm currently unable to get the 0.6 release working with the backport action.

You can see the example repo here:
https://github.com/mjlbach/backport-test

For backporting the following PR:
https://github.com/mjlbach/backport-test/pull/4

with the aforementioned failure in the actions log
https://github.com/mjlbach/backport-test/runs/3946924742?check_suite_focus=true#step:3:29

@mjlbach mjlbach changed the title Cannot read property 'match' of null Fails during PR creation with Cannot read property 'match' of null Oct 20, 2021
@mjlbach
Copy link
Author

mjlbach commented Oct 20, 2021

I think the issue is if the body (text) of the PR is empty. I'm guessing here: https://github.com/zeebe-io/backport-action/blob/3d81647b2ded9f404d573760c567b2fe4b324d2c/dist/index.js#L645

@korthout
Copy link
Owner

Hi @mjlbach, thanks for pointing this out! That's clearly a bug.

I think the issue is if the body (text) of the PR is empty.

Yeah, definitely looks like that this is the problem and the action should support pull requests with empty bodies.

I'm guessing here:

Yes, but only at runtime. The source code for that line is located here:
https://github.com/zeebe-io/backport-action/blob/3d81647b2ded9f404d573760c567b2fe4b324d2c/src/utils.ts#L34

Feel free to open a pull request to resolve this, if you happen to have time for it.

@korthout korthout added the bug Something isn't working label Oct 20, 2021
@korthout
Copy link
Owner

I'll edit the issue title to reflect the root cause.

The symptom is: Fails during PR creation with Cannot read property 'match' of null

@korthout korthout changed the title Fails during PR creation with Cannot read property 'match' of null Unable to backport pulls with empty description (i.e. body) Oct 20, 2021
korthout added a commit that referenced this issue Oct 29, 2021
This was a bug #175. Let's make sure it doesn't happen again.
korthout added a commit that referenced this issue Dec 24, 2021
This was a bug #175. Let's make sure it doesn't happen again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants