-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Change the interface of the PullRequest resource to be more granular. #1181
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dlorenc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on pkg/.
|
a4bb101
to
4cd45ae
Compare
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we're breaking this up and making it more granular! I think the logic itself could be made even more granular if you're up for it.
I think there are a couple of doc changes that need to go along with this:
- https://github.com/tektoncd/pipeline/blob/master/docs/resources.md#pull-request-resource
- https://github.com/tektoncd/pipeline/tree/master/cmd/pullrequest-init#pullrequest-init
(Feels like those 2 docs repeat each other a bit, so if you want the README to link to the resources doc that could be good - whatever you think is best!)
What do you think if we also included something in examples
that maybe just read from a PR in a public repo?
Yea, I'm going to add that one as a separate PR along with an integration test. |
The following is the coverage report on pkg/.
|
Done! |
The following is the coverage report on pkg/.
|
cmd/pullrequest-init/README.md
Outdated
The binary will look for GitHub credentials in the `$GITHUBTOKEN` environment | ||
variable. This should generally be specified as a secret with the field name | ||
`githubToken` in the `PullRequestResource` definition. | ||
For information about the payloads written to disk, see the [resource documentation](../../docs.resources.md#pull-request-resource). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wooooot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im gonna assume my unit test rhetoric did not convince you XD
/lgtm
/meow space
"RawStatus": "/tmp/pr/github/status.json" | ||
"Text": "comment body", | ||
"Author": "author", | ||
"ID": 202131633 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice updates!
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Currently the PullRequest resource produces one large json object representing the entire PR. This works, but makes it harder to write simple programs to manipulate this object. This commit changes this interface to produce a set of files, each representing a part of the initial pull request. This makes it easier for programs to do simple tasks like add labels or comments.
The following is the coverage report on pkg/.
|
/lgtm |
Changes
Currently the PullRequest resource produces one large json object representing the
entire PR. This works, but makes it harder to write simple programs to manipulate this
object.
This commit changes this interface to produce a set of files, each representing a part
of the initial pull request. This makes it easier for programs to do simple tasks like add
labels or comments.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes