axi0m / ratatoskr

A webhook notifier for new commits or releases in GitHub and GitLab repositories
MIT License
3 stars 1 forks source link

💥 Remove `requests-html` and leverage urllib.parse to URL encode GitLab Projects into API requests #42

Closed axi0m closed 2 years ago

axi0m commented 2 years ago

Background: https://stackoverflow.com/questions/39559689/where-do-i-find-the-project-id-for-the-gitlab-api

response = requests.get('https://gitlab.com/api/v4/projects/nephosec%2Fbof-adios/repository/commits', headers=gitlab_custom_headers)

Based off this GitLab project URL: bof-adios

Instead of using the project ID in the URL and having to scrape that project ID: https://gitlab.com/api/v4/projects/29354569/repository/commits

axi0m commented 2 years ago

In addition this will reduce our dependency graph and simplify the attack surface. 💯

axi0m commented 2 years ago

WIP: https://github.com/axi0m/ratatoskr/pull/47