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

[Dev] Dev PR workflow fails to add link to GH issue if the body of PR is empty #35943

Closed
raulcd opened this issue Jun 6, 2023 · 1 comment · Fixed by #36460
Closed

[Dev] Dev PR workflow fails to add link to GH issue if the body of PR is empty #35943

raulcd opened this issue Jun 6, 2023 · 1 comment · Fixed by #36460

Comments

@raulcd
Copy link
Member

raulcd commented Jun 6, 2023

Describe the bug, including details regarding any error messages, version, and platform.

It has been brought up on Zulip that if the body of the PR is empty the Dev PR workflow fails and the link to the issue.

Examples:

Component(s)

Developer Tools

@raulcd
Copy link
Member Author

raulcd commented Jul 4, 2023

This was brought up again on Zulip the error:

Run actions/github-script@v6
  with:
    github-token: ***
    script: const script = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/dev_pr/link.js`);
  script({github, context});

    debug: false
    user-agent: actions/github-script
    result-encoding: json
    retries: 0
    retry-exempt-status-codes: 400,401,403,404,422

TypeError: Cannot read properties of null (reading 'includes')
Error: Unhandled error: TypeError: Cannot read properties of null (reading 'includes')
    at commentGitHubURL (/home/runner/work/arrow/arrow/.github/workflows/dev_pr/link.js:87:43)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.exports (/home/runner/work/arrow/arrow/.github/workflows/dev_pr/link.js:107:7)

happened here: https://github.com/apache/arrow/actions/runs/5455750281/jobs/9927653433

raulcd added a commit to raulcd/arrow that referenced this issue Jul 4, 2023
raulcd added a commit to raulcd/arrow that referenced this issue Jul 4, 2023
* apacheGH-35943: [Dev] Ensure link issue works when PR body is empty

* Raul test
raulcd added a commit that referenced this issue Jul 5, 2023
### Rationale for this change

Fix a bug when PR body is empty and Dev workflow fails.

### What changes are included in this PR?

Ensure the link issue comment works in case of description being empty.

### Are these changes tested?

I have tested it on my fork here: raulcd#81

### Are there any user-facing changes?

No
* Closes: #35943

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@raulcd raulcd added this to the 13.0.0 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant