How does this works? I have been clicking around in Gitter but do not really understand what it is for how it should be used?blacey wrote:1) You can already - just ensure the activity feed is visible in GitterKunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how.
Pull Request HowTo
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Pull Request HowTo
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Pull Request HowTo
Yeah, I was/am, but ultimately it's really up to Yorik/Werner as to whether it has any use to continue to make PRs on the forums.blacey wrote:1) You can already - just ensure the activity feed is visible in GitterKunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how.
2) I thought Kurt was developing an auto-poster that would generate the Pull-request post in the forum.
But, I definitely agree with @yorik that the additional overhead does not provide any real value - if a process step doesn't provide value, it should be eliminated
Anyway, here's the status of what I have:
- A webhook server set up at api.kwkengineering.com
- Which will make a new topic here with the subject and contents of a new PR if a repo is set to send webhooks to it
- After the topic is created the link can be added in a comment on the PR
- It does NOT have locking the PR from further comments is not supported by PyGithub currently but can be implemented fairly easily with requests since it's a length 0 HTTP PUT to an address that can be constructed from the info in the PR
The code is a bit too messy to publish just yet because I have was having some issues with paths, etc, and they're hardcoded in plus debug statements and so forth. Regardless it was still a worthwhile learning experience and there may be some use for a webhook server in the future, even if it's for me and not the FreeCAD project.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Pull Request HowTo
Do you see the activity feed? It's shown by clicking a little hamburger menu (three horizontal lines) in the bottom right. Then it shows new PRs, comments, issues, merges, build statuses, etc, in a pane on the right.bernd wrote:How does this works? I have been clicking around in Gitter but do not really understand what it is for how it should be used?blacey wrote:1) You can already - just ensure the activity feed is visible in GitterKunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how.
Re: Pull Request HowTo
Mhh for me the three horizontal lines are on the bottom left and if I click on them a search opens. My idea was to add me too FreeCAD first because gitter do not know I would like to join FreeCAD community on gitter or does it?kkremitzki wrote:Do you see the activity feed? It's shown by clicking a little hamburger menu (three horizontal lines) in the bottom right. Then it shows new PRs, comments, issues, merges, build statuses, etc, in a pane on the right.bernd wrote:How does this works? I have been clicking around in Gitter but do not really understand what it is for how it should be used?blacey wrote:1) You can already - just ensure the activity feed is visible in GitterKunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Pull Request HowTo
Yeah, it sounds like you might need to join the FreeCAD/FreeCAD room first.bernd wrote:Mhh for me the three horizontal lines are on the bottom left and if I click on them a search opens. My idea was to add me too FreeCAD first because gitter do not know I would like to join FreeCAD community on gitter or does it?kkremitzki wrote:Do you see the activity feed? It's shown by clicking a little hamburger menu (three horizontal lines) in the bottom right. Then it shows new PRs, comments, issues, merges, build statuses, etc, in a pane on the right.bernd wrote:How does this works? I have been clicking around in Gitter but do not really understand what it is for how it should be used?blacey wrote:1) You can already - just ensure the activity feed is visible in GitterKunda1 wrote:It would be whimsical and fun but for sure not essential, to have a way to know when someone has sent a PR to the FC repo.
Not sure how.
Re: Pull Request HowTo
I could not find the room in gui. What I did was typing the following in the browser address: https://gitter.im/FreeCAD/FreeCAD Than on the bottom there is an orange button "join room" Thankskkremitzki wrote:Yeah, it sounds like you might need to join the FreeCAD/FreeCAD room first.
Re: Pull Request HowTo
Of course there would always be the possibility to do some webhook stuff to automatically post here when a PR is done on github, like kkremitzki did, but then it should be in a place or in a manner that doesn't need handling here. Maybe directly in the "archived pull requests" section...
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Pull Request HowTo
My copy repository for FreeCAD is out of sync with the main repository and I don't know how to proceed when I try and update it to the latest version of the officail repo I get the following
Code: Select all
family@Desktop:~/FreeCAD/git-src/FreeCAD_sf_master$ git pull official master
remote: Counting objects: 204, done.
remote: Total 204 (delta 161), reused 161 (delta 161), pack-reused 43
Receiving objects: 100% (204/204), 53.10 KiB | 0 bytes/s, done.
Resolving deltas: 100% (179/179), completed with 111 local objects.
From https://github.com/FreeCAD/FreeCAD
* branch master -> FETCH_HEAD
* [new branch] master -> official/master
Auto-merging src/Mod/OpenSCAD/importCSG.py
CONFLICT (content): Merge conflict in src/Mod/OpenSCAD/importCSG.py
Automatic merge failed; fix conflicts and then commit the result.
Re: Pull Request HowTo
Following the suggestions here you can use git reset with the option --hard.
But before using it make sure that you don't have any local changes you want to contribute because otherwise they are lost.
So, when you are sure you want to sync to FreeCAD master check with git log which <sha1> hash is the last one from official master in your local repository and then you can do:
git reset --hard <sha1>
Afterwards run git pull to get the latest changes from the FreeCAD master.
In future when creating a PR make sure that you create a local branch which you can push to your github account
git checkout -b my_local_branch
But before using it make sure that you don't have any local changes you want to contribute because otherwise they are lost.
So, when you are sure you want to sync to FreeCAD master check with git log which <sha1> hash is the last one from official master in your local repository and then you can do:
git reset --hard <sha1>
Afterwards run git pull to get the latest changes from the FreeCAD master.
In future when creating a PR make sure that you create a local branch which you can push to your github account
git checkout -b my_local_branch
- before pushing your branch make sure it's rebased on the latest FreeCAD master
- after you pushed the branch and FreeCAD master has been changed in the meantime just leave it. Do not merge changes of FreeCAD master back to your branch
- after the PR has been merged you can delete your local branch
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Pull Request HowTo
When I try and rebase on to master I just get the following messages
Looks like rebase did nothing, what did I do wrong?
Code: Select all
family@Desktop:~/FreeCAD/git-src/FreeCAD_sf_master/src/Mod/OpenSCAD$ git commit -a
[offset2 b4f540e] Add support for OpenSCAD offset
1 file changed, 39 insertions(+), 24 deletions(-)
family@Desktop:~/FreeCAD/git-src/FreeCAD_sf_master/src/Mod/OpenSCAD$ git status
On branch offset2
nothing to commit, working directory clean
family@Desktop:~/FreeCAD/git-src/FreeCAD_sf_master/src/Mod/OpenSCAD$ git rebase master offset2
Already on 'offset2'
Current branch offset2 is up to date.