Skip to content

Add simple PR comment sub-action#636

Open
bluwy wants to merge 6 commits into
mainfrom
pr-comment
Open

Add simple PR comment sub-action#636
bluwy wants to merge 6 commits into
mainfrom
pr-comment

Conversation

@bluwy
Copy link
Copy Markdown
Member

@bluwy bluwy commented May 28, 2026

Separate but complements #625

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 28, 2026

🦋 Changeset detected

Latest commit: 88b94b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread pr-comment/action.yml
body:
description: "The comment body to post on the PR."
required: true
update-id:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we maybe use a default value for this one? It feels like almost all users will like the auto-update mode to be enabled for them so it would be easier if update-id wouldn't be required to get that

Copy link
Copy Markdown
Member Author

@bluwy bluwy May 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking that this could be used for other things in the future, like #1, so I didn't want the action to be built specifically for the pr-status action. Or if for some reason they use this action for other workflows that comment on PRs.

Maybe it's not worth planning for that now and we can break later if we want? What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better for us to make this simpler for people. We should support update-id: null/false to opt out from the default behavior

Comment thread src/pr-comment/index.ts
Comment on lines +5 to +10
type CreateCommentParams = NonNullable<
Parameters<Octokit["rest"]["issues"]["createComment"]>[0]
>;
type UpdateCommentParams = NonNullable<
Parameters<Octokit["rest"]["issues"]["updateComment"]>[0]
>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

octokit package layout... requires acquired taste 🫠

Comment thread src/pr-comment/index.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants