Skip to content

Conversation

@omgitsbillryan
Copy link

Adds a repository param to allow the user to specify the repository where the GitHub issue is located. Allows for fetching issues from repos other than where the workflow was executed from.

@omgitsbillryan
Copy link
Author

@peter-murray what do you think?

Copy link
Owner

@peter-murray peter-murray left a comment

Choose a reason for hiding this comment

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

Thank you for this, I have only one suggestion around the validation on the input from a user and prefer to fail early with a nicer error to the user if they make a mistake in passing in a repository (i.e. not in the full name form).


getIssueBody(id) {
getIssueBody(id, repository) {
const [owner, repo] = repository.split('/');
Copy link
Owner

Choose a reason for hiding this comment

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

My only issue here is that it is possible for a user to provide an input that is not in this form and we would not detect this of fail nicely with the following call.

I would suggest that we validate the repository input early in the execution when we obtain that value from the user inputs and pass a consistent {owner: '', repo: ''} object to this function.

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