Permission to make pull requests

I need permission to make two pull requests:

https://github.com/ansible/ansible/issues/11070 - Feature request: ignore_instances option in ec2_asg

https://github.com/ansible/ansible-modules-core/issues/1445 - Default value for min_size and max_size at autoscaling creation

Can someone authorize it? I don’t want to make a PR without authorization to avoid unnecessary work from ansible official developer team.

Pull requests can be made by anybody, there is no need to ask for permission first. The only permission you may need is permission from your employer to contribute opensource code.

It sounds like he's actually asking whether anyone is already working
on this stuff. Or maybe whether this sort of change might be accepted
into the codebase.

Exact Doug Luce. Even this is emphasized in the documentation. This is because I’m questioning first.

May I make it?

The point of posting to ansible-devel first is NOT for permission but
to make sure no one is already working on the issue and/or the issue
is of use to the community and/or to help guide the implementation.

Mostly things to avoid wasting people's time.

Sorry if I missunderstood somenthing. My only goal is to help. When I said “permission” I wanna to say: please, someone could see if my work could be used for help the project?

Maybe you guys could be more educated next time with people that is investing time to contribute. Remember that this is an opensource project and it’s life depends of this kind of people.

I’ll ignore what happening here and make the pull request.Please, let’s focus on the proposed patch.

Thanks for attention.

Sorry if my tone seemed harsh in any way, I did not mean to be
anything other than informative.

We are happy to take new contributions and look forward to examining
your patches.

Ok Brian thanks.
I’ll make the PR ASAP.

Done: https://github.com/ansible/ansible-modules-core/pull/1446

I’ll wait for revision.

Thanks again.

I need to make a little change in my PR because today I’ve found a little bug. Reading docs, I’ve noticed this:

If you make a mistake you do not need to close your PR, create a clean branch locally and then push to github with –force to overwrite the existing branch (permissible in this case as no one else should be using that branch as reference). Code comments won’t be lost, they just won’t be attached to the existing branch.

I’m new in git. So, before doing something wrong, I need help to make this works… I need to create a new local branch and push it to the devel branch on github? How Can I do it?

Hi

I'm new in git. So, before doing something wrong, I need help to make
this works... I need to create a new local branch and push it to the
devel branch on github? How Can I do it?

Never push to the devel branch!

First of all, you should have a "fork" on github of ansible. If you don't, create one now by clicking the fork button on github.

On your local git repo, the "origin" repo points to the repo you cloned from, if you cloned directly from ansible's repo, you should change it, because you do not have write permissions, so you can not "push" anything to it.

In this case rename the branch to "upstream" e.g. and add your fork as "origin" doing it like this:

git remote rename origin upstream
git remote add origin <url>

Then a little advice, never do commits to the devel branch. It belongs to the project and you will mess up with unnecessary merges.

So before you commit, make a new local branch

git checkout -b feature/<foo>

If you already did commits to devel, no problem. Make a branch, so you commits also go into that branch and then reset devel to the state it had without your commits.

git checkout -b feature/<foo>
git checkout devel
git log
... remember the commit id right before your commits
git reset --hard <commit-id>

if you pushed the devel branch to your github fork already, reset this branch also:

git push origin devel -f

Thats it.

Now you did commits you want to push your branch to your github fork repo:

git push origin feature/<foo>

And make a pull request on the webinterface on github. If you found something you want to have changed without making a new commit? No problem:

... make changes to the file
git add <file>
git commit --amend
... optionally change commit message
git push origin feature/<foo> -f

Little advice here, this will rewrite the history and if you work with colleagues on a project, never rewrite history or your colleagues will get mad.

So the safe way would be just without --amend and without -f, which just adds a new commit.

... make changes to the file
git add <file>
git commit
git push origin feature/<foo>

To get all new stuff from ansible project, so called "upstream" repo.

git pull upstream devel

Hi

I'm new in git. So, before doing something wrong, I need help to make
this works... I need to create a new local branch and push it to the
devel branch on github? How Can I do it?

Never commmit to the devel branch!

First of all, you should have a "fork" on github of ansible. If you don't, create one now by clicking the fork button on github.

On your local git repo, the "origin" repo points to the repo you cloned from, if you cloned directly from ansible's repo, you should change it, because you do not have write permissions, so you can not "push" anything to it.

In this case rename the branch to "upstream" e.g. and add your fork as "origin" doing it like this:

git remote rename origin upstream
git remote add origin <url>

Then a little advice, never do commits to the devel branch. It belongs to the project and you will mess up with unnecessary merges.

So before you commit, make a new local branch

git checkout -b feature/<foo>

If you already did commits to devel, no problem. Make a branch, so you commits also go into that branch and then reset devel to the state it had without your commits.

git checkout -b feature/<foo>
git checkout devel
git log
... remember the commit id right before your commits
git reset --hard <commit-id>

if you pushed the devel branch to your github fork already, reset this branch also:

git push origin devel -f

Thats it.

Now you did commits you want to push your branch to your github fork repo:

git push origin feature/<foo>

And make a pull request on the webinterface on github. If you found something you want to have changed without making a new commit? No problem:

... make changes to the file
git add <file>
git commit --amend
... optionally change commit message
git push origin feature/<foo> -f

Little advice here, this will rewrite the history and if you work with colleagues on a project, never rewrite history or your colleagues will get mad.

So the safe way would be just without --amend and without -f, which just adds a new commit.

... make changes to the file
git add <file>
git commit
git push origin feature/<foo>

To get all new stuff from ansible project, so called "upstream" repo.

git pull upstream devel

Rene, thank you for update, but the docs says: Patches should always be made against the ‘devel’ branch.

http://docs.ansible.com/community.html

I’ve sent the pull request to devel branch. Now what? I need to cancel the PR? Who is wrong? My modification isn’t qualified as a “patch”?

Hi

Rene, thank you for update, but the docs says: /*Patches should always
be made against the ‘_devel_’ branch.*/

This means, your branch is based on devel and you want the commits to be in devel. This is ok.

So your pull request of branch feature/<foo> --> devel

But you should not make it like

So your pull request of your branch devel --> devel

I've sent the pull request to devel branch. Now what? I need to cancel
the PR? Who is wrong? My modification isn't qualified as a "patch"?

Patch is just another "word" for your changes.

No need to make a new PR except you made the changes in the devel branch as I wrote before. If you do so, close the PR reset the devel branch as I wrote and make a new PR.

Never do any commits in the devel branch, make a new branch from the devel branch and then make a pull request back to the devel, if they were merged, you can sync them back from upstream into your devel branch.

Got it! Thank you very much for attention, patience and education.

I’ll close my PR and make new one because I’ve not created a new branch from devel branch. I’ve did devel → devel. I’m very sorry for this mistake.

Done: https://github.com/ansible/ansible-modules-core/pull/1447

I’ll wait for revision.

You are welcome :slight_smile: