Gitlab Trigger count

Describe the problem/error/question

Hello, I would like to count the number of push from gitlab, and then perform an action. Is it possible ?

Information on your n8n setup

  • **n8n version:**0.231.3
  • **Database (default: SQLite):**SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**docker
  • Operating system:

Hi @Raphael_Teyssandier :wave:

Just to make sure I’m understanding as well, can you give a little bit more information about what you’re trying to do?

I had a look at the Gitlab API and it doesn’t seem like grabbing the number of pushes to a repository is supported, so I don’t think you’ll be able to do this.

I have 27 commit when I export language from POEditor to GitLab. And after all those 27 commit I would to run a script. So right, my solution is to add a delay after the first.

Hi @Raphael_Teyssandier - you can list the commits for a repository by following the API documentation here: Commits API | GitLab

But you can’t grab number of pushes through the API. With that commits call I linked, you can specify a date to before/on/after a date, which might help.

Since this isn’t part of the Gitlab node in n8n, you’d need to use a HTTP request node to make the API call.

There is a Gitlab trigger in the node for “on push”, but that would just set up a webhook event to fire for a push to a specific repo, and I don’t know if that’s quite what you’re looking for.

1 Like

Thank’s I’ll try to make it work.

1 Like

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