docs icon indicating copy to clipboard operation
docs copied to clipboard

Cannot reproduce behavior documented in pull_request.synchronize

Open christianbundy opened this issue 3 years ago • 2 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads?actionType=synchronize#pull_request

What part(s) of the article would you like to see updated?

Unfortunately, I don't think the documentation is correct -- can someone double-check me here?

A pull request's head branch was updated. For example, the head branch was updated from the base branch, new commits were pushed to the head branch, or the base branch was changed.

Specifically, I cannot reproduce the "or the base branch was changed" logic.

Steps:

  1. Open PR with action on pull_request
  2. Workflow runs because of the opened event
  3. Edit PR to change base branch from main to some_other_ref (different SHA)

Expected: CI should run because the base branch has changed.

Actual: CI does not run.

Additional information

No response

christianbundy avatar Jan 06 '23 19:01 christianbundy

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Jan 06 '23 19:01 welcome[bot]

Reviewing our recent webhooks, it seems that this is actually kicking off an edited event. Is it possible that changing base branch actually emits the edited event rather than synchronize?

The title or body of a pull request was edited.

-- https://docs.github.com/developers/webhooks-and-events/webhooks/webhook-events-and-payloads?actionType=edited#pull_request

However, looking at the schema of the event shows the base branch as part of the 'changes' payload:

image

christianbundy avatar Jan 06 '23 20:01 christianbundy

@christianbundy Thanks so much for opening an issue! We appreciate all the info and screenshots 💖

I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Jan 09 '23 16:01 cmwilson21

Thanks for opening this issue! I also was unable to trigger the "synchronize" action by changing the base branch of a PR. We need to update these docs internally, so I'm going to add a label to start that process.

skedwards88 avatar Jan 11 '23 01:01 skedwards88

Thank you for opening this issue! Updates to the REST/GraphQL API description must be made internally. I have copied your issue to an internal issue, so I will close this issue.

docubot avatar Jan 11 '23 01:01 docubot