Replies: 1 comment 7 replies
-
Here you go: (let ((rev "92a7ffc92b2bda6b6931a0586da28f7f8ea8d1a6"))
;; First try formatting the resource.
(forge--format-resource
;; This must be a `forge-object', "mytopic" is not.
;; `default-directory' must be inside the appropriate repository.
(forge-get-repository t)
;; Note that it is "commits" not "commit".
(format "/repos/:owner/:repo/commits/%s/comments" rev))
;; If that works, try making a request.
(forge--ghub-post (forge-get-repository t)
(format "/repos/:owner/:repo/commits/%s/comments" rev)
'((body . "a comment"))
:callback (forge--post-submit-callback)
:errorback (forge--post-submit-errorback)))
;; Because I ran this from *scratch* I got:
;; error in process filter: delete-file: Wrong type argument: stringp, nil
;; error in process filter: Wrong type argument: stringp, nil
;; But the request worked and the comment appeared on Github. |
Beta Was this translation helpful? Give feedback.
7 replies
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.
-
In the Julia package development world, one can trigger workflows (such as new package version registration) by commenting on a commit.
The workflow is something like
@ JuliaRegistrator register
There is already functionality for commenting on other github "topics" like issues, PRs, etc, but I wasn't able to find a way to comment on a new commit.
In the forge-repo, I found the
forge--submit-create-post
function, which seems to do the comment creation for issues.https://github.com/magit/forge/blob/main/lisp/forge-github.el#L551-L555
I've tried to get a toy version to work with my goal:
but haven't been able to make it work. Any insights are appreciated! Thanks.
Beta Was this translation helpful? Give feedback.
All reactions