UNPKG

5.94 kBMarkdownView Raw
1# Contributing to xero-node
2:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
3
4We want to make contributing to this project as easy and transparent as possible, whether it's:
5
6- Reporting a bug
7- Discussing the current state of the code
8- Submitting a fix
9- Proposing new features
10- Becoming a maintainer
11
12The following is a set of guidelines for contributing to Xero and its projects, which are hosted in the [XeroAPI Organization](https://github.com/XeroAPI) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
13
14### Table Of Contents
15[Code of Conduct](#code-of-conduct)
16
17[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
18
19[How Can I Contribute?](#how-can-i-contribute)
20 * [Which version of SDK are you using?](#Which-version-of-the-SDK-are-you-using)
21 * [Reporting Bugs](#reporting-bugs)
22 * [Suggesting Enhancements](#suggesting-enhancements)
23 * [Pull Requests](#pull-requests)
24
25
26## Code of Conduct
27Please note that this project is released with a [Contributor Code of Conduct](https://github.com/XeroAPI/xero-node/blob/oauth2/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
28
29## I don't want to read this whole thing I just have a question!!!
30
31> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
32
33We have an official [message board](https://community.xero.com/developer) where Xero API support and the community chimes in with helpful advice if you have questions.
34
35* [API Documentation](https://developer.xero.com/documentation/)
36* [Xero FAQ](https://developer.xero.com/faq)
37* [Community, the official Xero message board](https://community.xero.com/developer)
38* [Stackoverflow - Xero related](https://stackoverflow.com/questions/tagged/xero-api?sort=Newest)
39* [Submit requests for support](https://developer.xero.com/contact-xero-developer-platform-support/) to our API Support team.
40
41# How Can I Contribute?
42
43You can contribute by reporting bugs, suggesting enhancements, improving documentation i.e. [README](https://github.com/XeroAPI/xero-node/blob/oauth2/README.md) or submitting a pull request.
44
45
46## Which version of the SDK are you using?
47
48As of Sept 2019, support for oAuth 2 will be generally available for developers. During this transition period from oAuth 1.0a to oAuth 2, we will be supporting two versions of the SDK.
49
50
51* 3.x code resides in `oauth1` and supports oAuth 1.0a
52* 4.x code resides in the `master` branch and supports oAuth 2
53
54Bugs and enhancements for version 4.x will be prioritized over 3.x.
55
56## Reporting Bugs
57
58Bugs are tracked as issues in this repository.
59
60Before opening a new issue:
61* **check [the README](https://github.com/XeroAPI/xero-node/blob/oauth2/README.md)** to see if the behavior you observed might be expected and if configuration options are available to provide you with the desired behavior.
62
63* **perform a cursory search** to see if there's [an existing issue](https://github.com/XeroAPI/xero-node/issues) covering your feedback. If there is one and the issue is still open, **add a :+1: reaction** on the issue to express interest in the issue being resolved. That will help the team gauge interest without the noise of comments which trigger notifications to all watchers. Comments should be used only if you have new and useful information to share.
64
65### Write bug reports with detail, background, and sample code
66
67- Which version of the SDK are you using?
68- A quick summary and/or background
69- Steps to reproduce
70 - Be specific!
71 - Give sample code if you can.
72- What you expected would happen
73- What actually happens
74- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
75
76## Suggesting Enhancements
77
78When opening an issue for a feature request:
79* **use a clear and descriptive title** for the issue to identify the problem.
80* **include as many details as possible in the body**. Explain your use-case, the problems you're hitting and the solutions you'd like to see to address those problems.
81
82## Pull requests
83
84We welcome your feedback and pull requests. Be aware some code is generated and pull requests may not be the best solution - see below.
85
86### We Use OpenAPI Generator
87The best way to propose changes to the codebase is to open an [issue](https://github.com/XeroAPI/xero-node/issues) and discuss with our team.
88
89We are using [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) and [our OpenAPI specs](https://github.com/XeroAPI/Xero-OpenAPI), to create and update our models and client classes. Improvements may require updates to our OAS or our customized mustache templates instead of modifying via pull request.
90
91### Submit a pull request
92
931. Fork and clone the repository
941. Create a new branch: `git checkout -b my-branch-name`
951. Make your change, add tests if needed
961. Make sure the tests pass on your machine: `mvn test`
971. Push to your fork and submit a pull request
981. Pat your self on the back and wait for your pull request to be reviewed and merged.
99
100Here are a few things you can do that will increase the likelihood of your pull request being accepted:
101
102- Follow the [style guide](#style-guide).
103- Write tests.
104- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
105- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
106
107### Style Guide
108
109* 4 spaces for indentation rather than tabs
110
111## License
112By contributing, you agree that your contributions will be licensed under its MIT License.