-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pull-Request-Squash-Commit #1245
Conversation
@@ -225,7 +225,7 @@ public class TheMergeMethod | |||
[Fact] | |||
public void MergesPullRequest() | |||
{ | |||
var mergePullRequest = new MergePullRequest { CommitMessage = "fake commit message" }; | |||
var mergePullRequest = new MergePullRequest { CommitMessage = "fake commit message", CommitTitle = "fake title" }; |
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.
Is this a necessary change?
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.
No this is not necessary. but i thought i should also make changes in ObservablePullRequestsClientTests.cs .I wasn't sure that i should initialize property here or leave it as it was.. what do you say should i remove this?
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.
It looks like we're not asserting anything about this object, so I think we should revert this change. 🆒?
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.
yes you are right..i should revert it now. 👍
oops look like i did some thing wrong and haven't pushed required changes |
var merge = new MergePullRequest { CommitMessage = "fake message", CommitTitle = "fake title", Squash = true }; | ||
var result = await _fixture.Merge(Helper.UserName, _context.RepositoryName, pullRequest.Number, merge); | ||
|
||
Assert.True(result.Merged); |
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.
Could we assert something here about the commit title or message versus what we actually committed, to indicate this was squashed?
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.
sure i will add assert statement here. 😃
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.
One suggestion - look at the commit:
var commit = await _github.Repository.Commit.Get(_context.RepositoryOwner, _context.RepositoryName, result.Sha);
// TODO: something interesting goes here
...
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.
👍
@Sarmad93 thanks for starting this off. I added a couple of comments to help us complete this feature and verify we're doing everything right... |
@shiftkey thanks for guiding me. Sure we wil complete this one 👍 |
hi @shiftkey i am doing changes in integration test. when i ran build i saw that integration test were actually not running(skipping) because of some error
how can i make sure my test are passing? do i need to make a separate testing account for this? |
@Sarmad93 yeah you should create a test account because the integration tests do things like create repos and other things. Generally they try to clean up after themselves where possible, but definitely you want a separate test account to do this under. Refer to the integration test sectino in Contributors Guide for information about how to run the tests (essentially there's a powershell script to help you define those environment variables) |
@ryangribble i will test these against testing account but i am pushing some changes could you please review these especially |
sorry for incomplete commits this smartgit github client really has some weird behavior 😠 doesn't always add all files to staging area. |
Im not in a position to pull your code down and run it myself just now, but eyeballing your changes, yes that looks correct in specifying the accept header on the However on the unit test mock verification you shouldnt use Regarding the integration test assertion, is there also a way to verify the commitTitle specified was correctly applied? |
@ryangribble thanks for the code review 😆 yes i need to test these on testing account now. |
i am stuck in this testing phase 😞 |
@Sarmad93 looking at those errors, I think something wasn't set correctly. You can run the same script again to view and update the values that the tests need. |
Just putting this back to |
Hey @Sarmad93, I'd definitely like to ensure these new GitHub features make it into the next octokit release so if time is an issue for you to get back onto this (totally understandable!) just let me know if you want someone to pick it up from here 😀 |
@ryangribble yes i have been busy for last days and last time i remember i was stuck on integration test setup and i wasn't sure where to add parameter(header) in post request so i stopped working on this 😫 got tired. you can assign this to someone else. Really sorry i could not made it. |
If you want to keep working on it you're more than welcome to! It looks like you were at the point where we needed you to confirm your integration test settings... Easiest way is just to close visual studio, rerun the powershell script and ensure they are all set correctly, then have another go at running integration tests |
@ryangribble i made a test account and set the script against testing account but after setting up the script i was getting these errors. why these test are failing? most of the test in |
@ryangribble also when i build project in visual studio 2015 i get this error also |
@Sarmad93 some of the integration tests depend on the account being in a certain state - I've tried to keep it as runnable as possible for everyone, but differences do creep in which means they can fail. If you want to focus on just your test, I'd suggest running it from in Visual Studio. |
internal static class AssemblyVersionInformation | ||
{ | ||
namespace System { | ||
internal static class AssemblyVersionInformation { |
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.
This is unintended, right?
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 think this is a side-effect of .\build FormatCode
- I'm tracking this in shiftkey/Octokit.CodeFormatter#2
unit tests + convention tests build is passing locally but not here? 😕 |
@Sarmad93 Your has conflicts with |
@devkhan still not building? |
What did you do exactly? |
@devkhan i did only this |
Did you updated you master from upstream first? You have to do that as that will fetch all the latest commits made in the main repo's master. Then you have to do the following to resolve conflicts: git checkout <your_branch>
git rebase master
# Resolve any conflicts that may arise manually
# Then marked them resolved by:
git add .
# Then continue rebasing:
git rebase --continue
# Finally do a force push:
git push --force origin <your_branch> Let me what happens after doing the above steps. 👍 |
@devkhan on step 4( |
And if there are any conflicts while |
@devkhan sir first i would to thank you so much for your time and efforts 👍 i think this pr has gone to some fatal condition.. appveyor build is generating some strange errors 😆 |
@devkhan i have to redo this in a single commit. maybe it will solve the problem. |
The reasons of those errors are the diffs which are inserted into the files on conflicts. I also think that a new PR may be better or if the conversation here is relevant, you can go actually delete your branch locally and then recreate it from the latest upstream master, and then re-do your work on top of it. And finally, do a force push. |
i want to get back on this. i have free time for a while 😄 . I need a little help. |
You can specify
Don't reorder the parameters as part of this PR. I'm not really sure why |
@shiftkey could you please review changes i have made especially for |
@@ -184,6 +184,10 @@ | |||
<Project>{c8bc13b6-3fa3-4716-827d-e7706f976fe1}</Project> | |||
<Name>Octokit-NetCore45</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Octokit\Octokit.csproj"> |
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.
Not sure how this crept in, but this project reference shouldn't be needed 🔥 🔥 🔥
@shiftkey Really sorry for that... i accidentally add all the files to staging area without observing closely...i will fix this and push new changes..sorry again if this made you angry.. |
@Sarmad93 I'm not angry, I just like to delete code whenever possible 🔥 |
@Sarmad93 I'm happy with that integration test - let's wrap this up and get it merged! |
@shiftkey done. |
@Sarmad93 excellent, thanks! |
@shiftkey @ryangribble as always thanks for your code review and guidance 👍 you guyz helped me to finish it to end. |
@Sarmad93 Glad I could help. You don't need to call me "Sir", we're all here to help each other. And I'm happy this PR is finally merged. Keep up the good work. 👍 |
Implementation of #1236 opened by @ryangribble for Preview Support for Pull Request Merge Api recently introduced by github.