kt3k / update-pr-description

Update Pull Request Description on Push
Apache License 2.0
21 stars 14 forks source link

No such PR #4

Open cyrus-za opened 3 years ago

cyrus-za commented 3 years ago
image

The PR does exist and I do have github_token: ${{ secrets.GITHUB_TOKEN }} set. Not sure why it is failing. Yes the PR does point to master

rpbaltazar commented 2 years ago

Can you share your workflow setup?

mau2099 commented 2 years ago

did you find and answer? it looks like it's only triggerd on push events

mau2099 commented 2 years ago

I have this workflow, but i'm getting the same error message:

name: CI Badges

on:
  workflow_dispatch:
  pull_request:
    types: [opened, synchronize]

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          pr_body: 'some script for creating PR description from the branch diff'
          github_token: ${{ secrets.GITHUB_TOKEN }}
          destination_branch: feat/form-1372-release-cimaster-4 #i've tried with default **master**
iamdempa commented 2 years ago

Having the same issue

Loki-Afro commented 1 year ago

@kt3k i think you got the point by now what #13 tried to archive.

the main takeaway is that github.context.ref is only set to something useful when the action got triggered by a push, unfortunately it is used here

maybe #13 also solved follow up problems which one may encounter after fixing that. we faced a similar issue here

if one can override the source branch, basically including it in with one may have a workaround?

i solved it in my hacky repo using a different action https://github.com/Loki-Afro/manualaction/blob/4d4c04db156ebfd6d0f50c637a292df2deb8846a/.github/workflows/dependabot-to-jira.yml#L51

but it has its caveats too ... pure hack :D