Closed praneesha closed 4 years ago
Hi @praneesha
I don't know if there is anything I can do to help in this situation. The link-checker action is producing output which is larger than the maximum allowed by GitHub issues. This causes the create-issue-from-file action to fail with the above message. One option is to limit the scope of what the link-checker is doing. Perhaps split the work into two different jobs that would make two issues instead of one.
@peter-evans - I removed the problematic step of creating the GitHub issue as follows.
on: [push]
name: Check markdown links
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
id: lc
uses: peter-evans/link-checker@v1
- name: Fail if there were link errors
run: exit ${{ steps.lc.outputs.exit_code }}
Now, the GitHub Action exits with the above message.
But, I don't see the ./link-checker/out.md
file created. Where can I see the link checker report?
The file only exists on the Actions runner while the workflow is being executed. You need to do something with the file during the workflow, such as create an issue using the content. Alternatively, you could perhaps email the file to yourself. See sendgrid-action if you want to try that.
@peter-evans - I have configured SendGrid as follows:
on: [push]
name: Link Checker Example Command
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
id: lc
uses: peter-evans/link-checker@v1
- name: SendGrid
uses: peter-evans/sendgrid-action@v1
env:
SENDGRID_API_KEY: <MY-KEY>
SCRIPT_FILEPATH: ./scripts/sendgrid.js
The SendGrid step fails with the error below:
Any advice on how to get this resolved?
@praneesha Make sure the script file is executable.
Execute this command to make it executable and check the file mode change into git.
chmod +x ./scripts/sendgrid.js
@peter-evans - Instead of using SendGrid, I managed to upload the ./link-checker/out.md
file as a GitHub Actions artifact it as follows:
on: [push]
name: Link Checker Example Command
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link Checker
id: lc
uses: peter-evans/link-checker@v1
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: Link Checker Report
path: ./link-checker/out.md
Therefore, I am closing this issue. Thank you so much for all the replies above!
@peter-evans - I have configured the link-checker as follows:
I am getting the below error.
github.GithubException.GithubException: 422 {"message": "Validation Failed", "errors": [{"resource": "Issue", "code": "custom", "field": "body", "message": "body is too long (maximum is 65536 characters)"}], "documentation_url": "https://docs.github.com/rest/reference/issues#create-an-issue"}
How can I get this resolved?