GitHub node - Close issue as Not planned

Hi there,

Is there a way to close a GitHub issue as Not planned by using the GitHub node?

I’ve been playing a little bit with GitHub node and there is no ‘Close’ action per se, but there is an ‘Edit’ action that then can be configured to edit the State of a GitHub issue, from Open to Closed and viceversa.

image

In GitHub, it is possible to close an issue as ‘Completed’ or as ‘Not planned’, as if it got discarded because any reason.

image

Am I missing anything or currently you can only close an issue as ‘Completed’ but not as ‘Not planned’?

Any workaround?

Thanks!

  • n8n version: 0.126.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): not sure…
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

@RamJ , you can use HTTP Request node following the GitHub API documentation. By default, the issue will be closed as “completed”. To set it as “not planned” you need to add an additional property to the body, namely state_reason, with PATCH request.

That is, the JSON body could be as short as below

{
  "state": "closed",
  "state_reason": "not_planned"
}

I think this could be raised as a “Feature request” for n8n team.

1 Like

Thanks @ihortom . Indeed, I just used an HTTP request block as per your suggestion and it is working great. I guess it would be cleaner to have it in the GitHub node, but until that is supported at least we can have the same functionality this way.

Thanks again!

Hi @RamJ
thanks for bringing this up!

Please feel free to add this to Feature Requests and give it a vote, so our engineers can include this in their regular review to be picked-up.

:raised_hands:

For a bit of fun I have just opened the PR below which will add this, Once reviewed and merged it will be available in a future release.

Are you are on 0.126.1 I would recommend starting to plan an upgrade or a migration as there have been a lot of releases since that version.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

New version [email protected] got released which includes the GitHub PR 9848.

2 Likes