Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add comment #391

Open
henrik242 opened this issue Oct 2, 2023 · 2 comments
Open

Feature request: Add comment #391

henrik242 opened this issue Oct 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@henrik242
Copy link

henrik242 commented Oct 2, 2023

Firstly, thanks for a great tool! You should add donate options :)

Then the feature request: It would be really useful to be able to add comments to existing pull requests (with matching branch or PR title).

It would also be nice to be able to replace the first comment (pr body) content.

Usage:
  multi-gitter edit [script path] [flags]

Flags:
  ...
  -b, --pr-body string             Replace the body of the PR.
  -t, --pr-title string            Replace the title of the PR.
  --comment string                 Add a comment to the PR.
  ...
@henrik242 henrik242 changed the title Feature request: Add command to pull requests Feature request: Add comment to pull requests Oct 2, 2023
@henrik242 henrik242 changed the title Feature request: Add comment to pull requests Feature request: Edit or add pull requests comments Oct 2, 2023
@henrik242 henrik242 changed the title Feature request: Edit or add pull requests comments Feature request: Edit pull requests Oct 2, 2023
@henrik242
Copy link
Author

henrik242 commented Oct 3, 2023

For others in need of this, here's how to add PR comments using the REST API. You can get the PR number using multi-gitter's status command.

#!/usr/bin/env bash

set -o pipefail -o nounset -o errexit

REPO_NAME=$1
PR_NUMBER=$2
GITHUB_TOKEN=$3

curl -s -H "Authorization: token $GITHUB_TOKEN" \
 -X POST -d '{"body": "Awesome comment"}' \
 "https://the.github.host/api/v3/repos/${REPO_NAME}/issues/${PR_NUMBER}/comments"

@lindell lindell changed the title Feature request: Edit pull requests Feature request: Add comment Oct 19, 2023
@lindell lindell added the enhancement New feature or request label Oct 19, 2023
@lindell
Copy link
Owner

lindell commented Oct 19, 2023

For updating the PR body, there is this #368 (now stale) PR to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants