Commit Graph

18 Commits

Author SHA1 Message Date
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