Skip to content
Advertisement

Tag: gitlab

How to create a new branch, push a text file and send merge request to a gitlab repository using Python?

I found https://github.com/python-gitlab/python-gitlab, but I was unable to understand the examples in the doc. Answer That’s right there are no tests we can find in the doc. Here’s a basic answer for your question. If you would like a complete working script, I have attached it here: https://github.com/torpidsnake/common_scripts/blob/main/automation_to_create_push_merge_in_gitlab/usecase_gitlab_python.py Breaking down the steps below: Create an authkey for you: Follow the

How to run pylint only on changed files in Gitlab?

I’m trying to run pylint only on changed python files, but my build keeps failing. I have extracted the changed files through git diff and saved them in a variable, but when I inject the variable into the pylint call, it fails. It works fine with a hardcoded filename however. Here is my yaml: Answer While qathulu answer is adequate,

Advertisement