Skip to content

Instantly share code, notes, and snippets.

View vldmrdev's full-sized avatar
🔋
Open to Work

vldmrdev

🔋
Open to Work
  • Mars
View GitHub Profile
@vldmrdev
vldmrdev / how_to_get_github_projects_id.md
Last active March 24, 2025 02:05
How to get github project's ID
import requests

GITHUB_TOKEN = 'GitHub personal access token'  # Your GitHub personal access token
REPO_OWNER = 'username'  # The GitHub username/organization
REPO_NAME = 'repo-name'  # The repository name

url = f'https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}'

headers = {
@vldmrdev
vldmrdev / get_github_action_sha.md
Last active October 15, 2025 10:31
Script for getting hash of action by tag for secure your actions

"It is a good manner to pin GitHub Actions versions by commit hash. GitHub tags are mutable so they have a substantial security and reliability risk."

Inspired by https://github.com/suzuki-shunsuke/pinact 😂

import requests


def git_action_sha(action: str) -> str:
    github_api = "https://api.github.com/repos"