From 038d5532058ccc73c8af0e2d7ee77c068f78fae0 Mon Sep 17 00:00:00 2001 From: Gourav Rusiya Date: Sun, 18 Oct 2026 15:05:52 +0530 Subject: [PATCH 1/2] chore(ci): add placeholder validate_pr script, PR template, and changelog for testing PR validation --- .github/PULL_REQUEST_TEMPLATE.md | 24 ++++++++++++++++++++++++ CHANGELOG.md | 8 ++++++++ scripts/validate_pr.py | 19 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CHANGELOG.md create mode 100644 scripts/validate_pr.py diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..054367f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + + + + +### Summary + +Provide a short description of the change in this pull request. + +### Checklist + +- [ ] PR title follows the format: `: ` (e.g. `fix: correct typo in solution`) +- [ ] PR description explains what and why (include references to issues if applicable) +- [ ] All new code is commented and follows repository style +- [ ] Relevant tests have been added or updated +- [ ] I have run the test suite locally and all tests pass +- [ ] The change is limited to a single problem or logical change + +### Related Issue + +If this PR addresses an existing issue, link it here: # + +### Notes for Reviewers + +Any additional information for reviewers or special steps to test. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e012f8f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +This repository follows a simple changelog to keep track of notable changes. + +## Unreleased + +- test: add placeholder PR validation script and PR template for CI workflow testing + diff --git a/scripts/validate_pr.py b/scripts/validate_pr.py new file mode 100644 index 0000000..06751ae --- /dev/null +++ b/scripts/validate_pr.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +import os +import sys + +# Minimal non-failing PR validation placeholder +# Prints environment variables provided by the workflow so we can inspect them in the job logs. + +def main(): + print("validate_pr: placeholder — environment:") + print("PR_TITLE =", os.getenv("PR_TITLE")) + print("PR_BODY =", os.getenv("PR_BODY")) + print("BASE_SHA =", os.getenv("BASE_SHA")) + print("HEAD_SHA =", os.getenv("HEAD_SHA")) + # Add a simple hint to be visible in logs + print("validate_pr: placeholder script completed successfully.") + return 0 + +if __name__ == '__main__': + sys.exit(main()) From 7828bc1750d4c53f33750de04dc05c9bb1111eb9 Mon Sep 17 00:00:00 2001 From: Gourav Rusiya Date: Sun, 18 Oct 2026 15:11:14 +0530 Subject: [PATCH 2/2] Add Two Sum solution in Python Implement Two Sum solution with a test case. --- Python/Two_Sum/solution.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Python/Two_Sum/solution.py diff --git a/Python/Two_Sum/solution.py b/Python/Two_Sum/solution.py new file mode 100644 index 0000000..9735728 --- /dev/null +++ b/Python/Two_Sum/solution.py @@ -0,0 +1,19 @@ +# LeetCode Problem: Two Sum +# URL: https://leetcode.com/problems/two-sum/ +# Language: Python 3 + +from typing import List + +class Solution: + def twoSum(self, nums: List[int], target: int) -> List[int]: + seen = {} + for i, v in enumerate(nums): + need = target - v + if need in seen: + return [seen[need], i] + seen[v] = i + +# Example quick test runner (optional) +if __name__ == "__main__": + s = Solution() + print(s.twoSum([2,7,11,15], 9)) # expected [0, 1]