This repository was archived by the owner on May 25, 2025. It is now read-only.
Make context.issue and context.repo objects#61
Merged
JasonEtco merged 1 commit intoJasonEtco:v2from Mar 20, 2019
Merged
Conversation
Owner
|
I'm so glad that someone finally said something 😅 this is a remnant of Probot's code (I quite literally copy-pasted), and that decision was made in Probot before the object spread operator was in LTS Node. That's not a good enough reason for it to be here though! Unfortunately, this is the kind of change that will break almost every action, so it'll need mean a breaking change/new major version to v2 (which should already be done for #41). In any case, still very much in favor. |
Contributor
Author
|
Sounds good! This was a quick change, so no worries if you close this PR and implement it later! |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The way that
context.issueandcontext.repoare functions that merge their arguments has been a point of confusion for me quite a bit.Given that Node supports object spread, and you can achieve the same goal with that, does it make sense for
context.issueandcontext.repoto just be (frozen) objects, instead? Before I read over the readme in much more detail, it's how I expected it to work, and looks a little more idiomatic to me.vs