automerge-action icon indicating copy to clipboard operation
automerge-action copied to clipboard

Difference between local and GitHub

Open ians-shipt opened this issue 3 years ago • 1 comments

Hello! I've been doing a bit of debugging to try and figure out why the action wasn't working on GitHub (it would always say mergeable_state: blocked even when the merge button was green), and I finally got a chance to debug locally. From what I've observed, the calls (in fetchPullRequest) to the github api are returning different results locally vs during the action.

They both says mergeable: true, but have a different in the mergeable_state. Any suggestions or ideas? Thanks!

GitHub Action Output Local Debugging Output
image image

Also, unsure if it's this action, but the most recent label is being removed (appears to be related to this) even though MERGE_REMOVE_LABELS is set to ''

Conversation Config
image image

ians-shipt avatar Jun 24 '22 16:06 ians-shipt

I experienced similar issues and we assumed some kind of caching issues some time ago, so headers: { "If-None-Match": "" } was added. Without access to GitHub internals we can only speculate, but I assume some kind of logic (maybe caching) that handles requests coming from GH actions differently than external requests.

Regarding the label issue, we have logger.info("Removed labels:", labelNames);, do you see this in the logs?

pascalgn avatar Oct 07 '22 19:10 pascalgn