GitHub Actions → Pony Migration Analysis #46
SeanTAllen
started this conversation in
Research
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Assessment of what
github_rest_apiwould need to replace the Python code ineach ponylang GitHub Action bot. All four bots currently use Python + PyGithub.
Quick Summary
release-notes-reminder-bot-action
What it does: When a changelog label is added to a PR, checks if release
notes are included. If not, posts a reminder comment. Uses a sentinel HTML
comment (
<!-- release-note-reminder-bot -->) to avoid duplicate reminders.GitHub API operations needed:
GET /repos/{owner}/{repo}GET /repos/{owner}/{repo}/issues/{number}GET /repos/{owner}/{repo}/issues/{number}/commentsGET /repos/{owner}/{repo}/pulls/{number}/filesfilenamefield)POST /repos/{owner}/{repo}/issues/{number}/commentsWhat's missing for the API:
filename). The bot checks forfiles with
status == "added"in the.release-notes/directory. Need to addstatusfield to PullRequestFile. (CommitFile already hasstatus— samepattern.)
checking a sentinel this is likely fine iterating the first page.
Git operations: None.
Other dependencies: None.
Assessment: This is the most portable action. All 5 API endpoints already
exist in the library. The only gap is the
statusfield on PullRequestFile.No git operations, no external services.
Missing from github_rest_api:
statusfieldchangelog-bot-action
What it does: When a PR is merged, searches for the PR by commit SHA, checks
for changelog labels, then updates CHANGELOG.md using
changelog-toolandpushes the change.
GitHub API operations needed:
GET /search/issues?q=is:merged+sha:{sha}+repo:{repo}GET /repos/{owner}/{repo}GET /repos/{owner}/{repo}/pulls/{number}labelsfield — existsWhat's missing for the API: Nothing significant. SearchIssues works for the
query pattern used. All needed PR fields are already modeled.
Git operations (problematic for Pony port):
git add CHANGELOG.mdgit commit -m "Update CHANGELOG for PR #N"git pushwith retry logic (pull --rebase on conflict, up to 5 attempts)Other dependencies:
changelog-toolCLI (already a Pony binary — could be used as a library orkept as a subprocess call)
Assessment: The GitHub API side is fully covered. The blocker is git
operations — Pony has no git library. The bot needs to clone, commit, and push,
with retry/rebase logic on push conflicts. This would require either:
gitvia Pony'sprocesspackageMissing from github_rest_api:
release-notes-bot-action
What it does: When a PR is merged, searches for the PR by commit SHA, checks
each commit for
.release-notes/file changes, then either merges them intonext-release.md(if PR has changelog label) or deletes them (if no label).GitHub API operations needed:
GET /search/issues?q=is:merged+sha:{sha}+repo:{repo}GET /repos/{owner}/{repo}GET /repos/{owner}/{repo}/commits/{sha}sha,status,filename— existsGET /repos/{owner}/{repo}/pulls/{number}labels— existsWhat's missing for the API: Nothing. All endpoints and fields needed are
already present.
Git operations (problematic for Pony port):
git rm(remove release notes files)git add .release-notes/next-release.mdgit commitgit pushwith retry logic (pull --rebase on conflict, up to 5 attempts)Other dependencies: None beyond git.
Assessment: Same situation as changelog-bot-action. API side is covered.
Git operations are the blocker.
Missing from github_rest_api:
release-bot-action
What it does: Orchestrates the entire release process for ponylang projects
via a 3-phase tag-triggered workflow (prepare → release artifacts → announce).
Contains 15 individual scripts.
GitHub API operations needed:
GET /repos/{owner}/{repo}GET /repos/{owner}/{repo}/issues?labels={label}POST /repos/{owner}/{repo}/issues/{number}/commentsGET /repos/{owner}/{repo}/releases/tags/{tag}PATCH /repos/{owner}/{repo}/releases/{id}POST /repos/{owner}/{repo}/releasesWhat's missing for the API:
GetRepositoryIssueswith label filter (paginated) — used to find "LastWeek in Pony" issue on ponylang-website
GetReleaseByTag— get a release by its tag nameUpdateRelease(PATCH) — update an existing release's notes. Requires addingHTTP PATCH support to the request infrastructure.
Git operations (extensive, problematic for Pony port):
git add,git commit,git push(with retry/rebase) — in 8 of 15 scriptsgit tag -a(create annotated tags)git push origin <tag>(push tags)git push --delete origin <tag>(delete remote tags)Other dependencies:
changelog-toolCLI (Pony binary, used via subprocess)zuliplibrary — sends release announcements)README.md with regex substitutions, .release-notes/ rotation
Assessment: This is the hardest to port. It has the most git operations
(tagging, pushing, deleting remote tags), needs HTTP PATCH for the GitHub API,
interacts with Zulip, and does complex file manipulation. The 15 scripts form
a multi-phase workflow with inter-dependencies via tag triggers. Even if the
API side were complete, the git and Zulip dependencies make a full port
impractical without a Pony git library and Zulip client.
Missing from github_rest_api:
GetRepositoryIssueswith label filter (paginated)GetReleaseByTagUpdateRelease(requires HTTP PATCH infrastructure)Cross-cutting concerns for all git-dependent actions
All three git-dependent actions (changelog-bot, release-notes-bot, release-bot)
share these patterns that Pony currently can't handle natively:
{actor}:{token}@github.comin clone URL
retries to handle concurrent pushes
changelog-toolCLIPony's
processpackage could shell out togitandchangelog-tool, butthe retry/rebase logic and error handling would be more complex than in Python.
The absence of a Pony git library is the primary blocker for porting these
actions.
Recommended porting order (if pursued)
field added. No git, no external services. Could be ported today.
list issues with label filter (see NEEDED_TO_SERVE_SYNC_HELPER.md).
Blocked on git operations.
Beta Was this translation helpful? Give feedback.
All reactions