Commit Graph

26 Commits

Author SHA1 Message Date
Shakar Bakr
0740d8c2c3
Fix URL construction in GitHubClient.py for pull requests and issues by replacing target_repo with repo, ensuring correct references in API calls.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 15:48:10 +03:00
Shakar Bakr
323f55a336
Merge remote-tracking branch 'upstream/master'
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 14:46:08 +03:00
Shakar Bakr
61dcc147f4
Update diff_url logic in GitHubClient.py to simplify commit comparison handling. Adjusted the URL for single commit cases and removed unnecessary comparisons against an empty tree.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 13:57:00 +03:00
Shakar Bakr
569f543320
Remove deprecated handling of full repository path in GitHubClient.py, enforcing the use of separate OWNER and TARGET_REPO inputs for clarity and consistency.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 13:54:35 +03:00
Shakar Bakr
e29de55f99
Fix indentation in GitHubClient.py for repository name assignment, improving code readability and consistency.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 13:30:43 +03:00
Shakar Bakr
783f67f10b
Refactor action.yml and GitHubClient.py to enhance cross-repository issue creation by separating OWNER and TARGET_REPO inputs, improving clarity in usage and documentation. Update README.md to reflect new configuration requirements and provide clearer examples for users. Adjust example workflow to align with new input structure.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-15 13:28:46 +03:00
Shakar Bakr
f722349382
Update GitHubClient.py to use target_repo for issue comments, assignees, and pull request URLs, ensuring consistency in cross-repository interactions.
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-06-10 10:22:28 +03:00
alstr
6099be60cb Revert "Merge pull request #270 from ditkrg/master"
This reverts commit 317efb4ff2, reversing
changes made to 3bd536e14a.
2025-06-06 18:08:28 +01:00
Shakar Bakr
1b4753ffdd
Refactor action to use composite run steps and support cross-repository issue creation
- Changed action execution from Docker to composite with Python setup.
- Added `TARGET_REPO` input to allow issue creation in a specified repository.
- Updated `GitHubClient` to use `TARGET_REPO` for issue and milestone URLs.
- Enhanced README with instructions for cross-repository usage.
- Introduced example workflow for creating TODO issues in another repository.

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-05-15 15:49:54 +03:00
alstr
cf5f5d2b95 Encode URLs
Fixes #263
2025-04-10 15:11:54 +01:00
alstr
0672dc170b Revert "Merge pull request #260 from schott12521/schott12521/main"
This reverts commit b46ff98258, reversing
changes made to 751dd2f2ad.
2025-01-31 10:31:50 +00:00
Scott
c7789e046e feat: adding default labels to issues 2025-01-28 12:48:45 -08:00
antoniogonzalezsuarez
ad1d917043 Add {} to fix f-string 2024-12-16 18:42:20 +00:00
alstr
84220a48d7 Add diff fallback URL 2024-12-12 16:01:19 +00:00
alstr
454715719f Fix diff URL for PRs
Fixes #231
2024-12-12 15:14:28 +00:00
alstr
b436b792bc Fix quote marks 2024-12-06 18:29:28 +00:00
alstr
edf5d49a3c Improve diff error message 2024-12-06 18:22:26 +00:00
alstr
7b4aab7105 Add User-Agent header
Fixes #248
2024-11-22 15:02:37 +00:00
Alastair Mooney
1484e53cbd
Update GitHubClient.py
Add server URL to GitHub Client

Resolve conflict in #218
2024-11-05 09:48:38 +00:00
Robert Alonso
f1f17d8372 refactor: add common base class to GitHubClient and LocalClient
Enables adding type checking to minimize mypy errors
2024-10-28 18:38:59 +00:00
Robert Alonso
bd01636b00 refactor: move insert_issue_urls logic to main 2024-10-28 18:38:59 +00:00
Robert Alonso
02c158cabe refactor: abstract diff method within client
There's no reason to have main directly construct
the URL. A different VCS (such as GitLab) could
have a different URL construction. Further, in the
case of LocalClient, there is no URL.
2024-10-28 18:38:59 +00:00
Robert Alonso
1674ad54d4 refactor: get_issue_url() returns *just* the URL
Leave the extra text to the caller (main)
2024-10-28 18:38:59 +00:00
Robert Alonso
c05a9e3f1a refactor: move GitHub-specific code into class
Add a new method, get_issue_url(), which returns
the VCS-specific web URL for viewing an issue.
This results in moving GitHub-specific code from
main into GitHubClient, but with no change in behavior.
2024-10-25 00:07:47 +00:00
Robert Alonso
714153eaf3 feat: add Local client
This is just a safe fallback for local testing.
If environment variables which activate the
creation of the GitHub client aren't set, then
the Local client is created. It acts on the most
recent commit of the repo in the working directory.

Minor edit to GitHubClient so that it raises an
EnvironmentError exception if INPUT_GITHUB_URL
environment variable is not defined. This allows
main to detect the error and fall back to trying
to use the Local client
2024-10-25 00:07:47 +00:00
Robert Alonso
662435d7fc refactor: split into modules
Split main.py into modules to (mostly) isolate the
GitHub-specific code from the general TODO
detection and program logic.
This is both for readability/maintainability and
to prepare for potentially supporting other
version control systems (e.g. GitLab, BitBucket).
2024-10-25 00:07:47 +00:00