-
-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Labels
Description
Subject of the issue
My attempt to create a PR is failing with the error message. My use case is when the generated Swagger doc changes for my project, a PR is opened to merge the changes.
Create or update the pull request
Attempting creation of pull request
Error: fetch failed
This was working, but has recently stopped. The branch is created and pushed successfully. It’s just the PR step that is failing.
Steps to reproduce
jobs:
documentation:
name: Documentation
runs-on: [self-hosted]
permissions:
contents: write
pull-requests: write
env:
swaggerFile: ./swagger.json
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install project dependencies
run: |
npm ci
- name: Update Swagger doc
run: |
npm run swagger-autogen
- name: Check for changes
id: changes
run: |
git diff --exit-code || echo "::set-output name=changed::true"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
if: steps.changes.outputs.changed == 'true'
with:
base: main
commit-message: 'Updated swagger doc'
branch: docobot/githib_actions/swagger-doc
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
delete-branch: true
title: 'Update Swagger Doc'
body: |
Update Swagger doc due to changes in ${{ github.sha }}
labels: |
documentationdezren39, rtfcoimbra and MaUhlik-cen56998