Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
76 lines (64 loc) · 3.24 KB
/
Copy path.env.example
File metadata and controls
76 lines (64 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Environment variable template for LeetCode Cloud Sync
# Copy this file to .env for local development.
# NEVER commit the actual .env file — it contains secrets.
# -------------------------------------------------------------------
# Required
# -------------------------------------------------------------------
# Your LeetCode username (public, not a secret)
LEETCODE_USERNAME=your_leetcode_username
# Destination GitHub repository in "owner/repo" format.
#
# Mode A — same-repository setup (default):
# Set this to the repository where this code lives (e.g. kaviyack/leetcode-cloud-sync).
# The built-in GITHUB_TOKEN has write access to this repo automatically.
#
# Mode B — separate submissions repository:
# Set this to your dedicated solutions repo (e.g. kaviyack/leetcode-submissions).
# You MUST also set GITHUB_TOKEN to a fine-grained PAT with Contents write
# permission on that repository (the built-in Actions token cannot cross repos).
GITHUB_REPO=your_github_username/your-destination-repo
# GitHub token with Contents write permission on the destination repository.
#
# In GitHub Actions (Mode A — same repo):
# This is provided automatically as GITHUB_TOKEN. No action needed.
#
# In GitHub Actions (Mode B — separate repo):
# Create a fine-grained PAT and add it as secret SUBMISSIONS_TOKEN.
# The workflow uses SUBMISSIONS_TOKEN when set, falling back to GITHUB_TOKEN.
# See README § Creating a fine-grained PAT for the minimum required permissions.
#
# For local use (either mode):
# Generate a fine-grained PAT with Contents: Read and write on the destination repo.
GITHUB_TOKEN=ghp_your_token_here
# -------------------------------------------------------------------
# LeetCode authentication — required for submission source code
# -------------------------------------------------------------------
# These values come from your browser's cookies after logging in to leetcode.com.
#
# HOW TO GET THEM:
# 1. Log in to https://leetcode.com in your browser.
# 2. Open DevTools → Application (Chrome) or Storage (Firefox) → Cookies.
# 3. Find the cookie named "LEETCODE_SESSION" and copy its value.
# 4. Find the cookie named "csrftoken" and copy its value.
#
# WARNING:
# - Treat these like passwords. Anyone with these cookies can access your account.
# - They expire when you log out or LeetCode invalidates them.
# - In GitHub Actions, store these as Secrets (never as plain variables).
# - Do NOT paste them into source files, README, or any public place.
LEETCODE_SESSION=your_leetcode_session_cookie_here
LEETCODE_CSRF_TOKEN=your_csrftoken_cookie_here
# -------------------------------------------------------------------
# Optional
# -------------------------------------------------------------------
# Git branch to commit new submissions to (default: main)
GITHUB_BRANCH=main
# Directory within the destination repo where solutions are stored (default: solutions)
SOLUTIONS_ROOT=solutions
# How many submissions to fetch in one run (default: 20, max practical: 40)
FETCH_LIMIT=20
# Log level: DEBUG | INFO | WARNING | ERROR (default: INFO)
LOG_LEVEL=INFO
# Committer identity for automated commits (defaults shown below)
# GIT_AUTHOR_NAME=Kaviyavarshini
# GIT_AUTHOR_EMAIL=153267681+kaviyack@users.noreply.github.com