Best practices for committing to Openfire code base?

Hi all,

Haven’t made any contributions since Openfire was in SVN.

Is there a contributors or developers guide for best practices on the new Github repo?

Need to make a few changes to the Openfire code base with regards to the Monitoring plugin etc. is best practise to create pull requests for every change, for major ones, or do all devs here commit directly to master?



Smack has a section on this which applies not only to Smack: Guidelines for Smack Developers and Contributors · igniterealtime/Smack Wiki · GitHub

Hi Leon,

I suggest to fork the Openfire repository.

Then do whatever you want in your fork.

Usually you put your work on a feature or bug fix in its own branch. Then commit your changes to your branch.

If you are done, you can make a pull request against the igniterealtime/Openfire master (or a branch, but for now, all have made their PR against master).

Seems to be good practice to rebase your branch to master and squash it into a single commit before the PR, but I am not sure about. It probably depends on what you are doing. Several logical commits, which are only corrections or test/development commits should probably be squashed. If there’s more work, keep them separated, I’d say.

I think nobody has committed directly to master, except Dele (for Video stuff only). PRs are a nice thing to see changes.

So for example on ticket OF-672 I need to make a 5 line change to a properties file. As an Openfire dev with write access (I think ) do I clone, branch, submit a pull request and then approve my own pull request to make such a minor change?

Obviously we want to really avoid mistakes and rubbish ending up in the official codebase but is this required for minor changes?

I’ve did it just recently, too, with a very simple 6 line change.

OF-853: XEP-0077 Registration must return if username … by sco0ter · Pull Request #119 · igniterealt…

I think it’s a nice way to inform other developers on the changes, even if they are trivial.

But I’d say, chose, what is the most convenient for you. We should be happy about every contribution, no matter in which way it’s provided.

Sounds like the normal flow for most projects. Do all devs need to pitch in on PRs or do I approve my own PR?

Sure, will aim for a PR wherever possible then. Thanks.

The normal flow is, that you make a PR and after a few days/weeks either Daryl or Dave accepts them :stuck_out_tongue: