I started a new branch (3.x-dev) on my repository and activated documentation building for that branch using the admin panel. Under the Builds section, I've started to observe multiple builds on the same commit (to be exact, 2 builds) for 3.x-dev branch. I haven't observed this issue for latest and stable builds.
For instance, builds identified by the numbers 6263728 and 6263729 are triggered by the same commit. There are a bunch of builds generated in the same way on the Builds page: https://readthedocs.org/projects/nurbs-python/builds/
This doesn't look like a serious issue but I feel that something is wrong.
__Update:__ I would like to update my post since I have merged 3.x-dev branch to master and then deleted 3.x-dev a couple of weeks ago.
__Commit__: 1b0e5b24413d681ca603749dc3a7088bd0055121
RTD links to builds pointing to the same commit:
Single build for each commit
2 builds for each commit
@orbingol Do you perhaps have two webhooks set up? You might see these under your project admin dashboard -> integrations, or perhaps under Github/bitbucket webhooks.
@agjohnson I checked it and it seems I have only one webhook set up with the name "GitHub Incoming Webhook" under Admin->Integrations.
On the other hand, GitHub side has 1 Webhook and 1 Integration set up for RTD. I think these are done automatically during the initial integration of the repo to RTD. I don't remember changing these on GitHub under repository settings. Would the existence of the webhook and the integration at the same time be the problem?
Hello again,
I would like to update my post since I have merged 3.x-dev branch to master and then deleted 3.x-dev a couple of weeks ago.
__Commit__: 1b0e5b24413d681ca603749dc3a7088bd0055121
RTD links to builds pointing to the same commit:
Thanks.
I think I figured this out. Since I am pretty sure that I haven't changed any settings after RTD integration of the repository, I am not sure why this has happened. It could be some GitHub issue, it could be something else or it could be the way things work or the things could have changed after I registered my repository to RTD, I have no information on that. However, I would like to explain how I fixed it.
First of all, I checked the services registered to my repository. The exact link to the Services menu is:
https://github.com/orbingol/NURBS-Python/settings/installations
On this page, I found ReadTheDocs under the services and clicked on it. You will see something like this:

Uncheck Active box here. Why do we do that? Well, I know this doesn't explain 4-5 same commit builds but according to my observations, whenever I push commits to my repo, GitHub notifies RTD and starts building documentation. At the same time, RTD webhook gets activated (https://readthedocs.org/api/v2/webhook/nurbs-python/2531/) and starts building documentation with the same commit. As a result, one push triggers two builds.
I am not an expert on GitHub API or I have never coded with RTD API, so I may be completely wrong in the way I explain the result but simply unchecking RTD service on the GitHub side fixes the problem. Just to note, I haven't touched anything (till now) related to RTD integration on the GitHub side and I believe everything was automatically generated during RTD integration or somehow changed by RTD or GitHub updates. Still not sure about why it happened.
Correct, the ReadTheDocs service is deprecated and should be removed -- it isn't added for new projects any more. Both this service and any webhook will push to RTD and instruct us to build documentation for a version. This would build your project multiple times, though 4-5 times is excessive. Does removing the ReadTheDocs service help?
You should have a list of integrations on your project admin dashboard, under Integrations. You should have only one and you can actually see the pushes that we receive there.
@agjohnson, removing/disabling ReadTheDocs service on the GitHub repo side definitely solves my problem. Although I've checked it once, there seems no multiple builds on the devmaster branch after the change. I also checked the RTD webhook options and I can only see the pushes that RTD receives as you said. Since the GitHub service is deprecated, I guess I can safely remove the service from the repo settings on the GitHub side.
Just to make the things clear: I haven't touched anything on the RTD side but just removed/disabled ReadTheDocs service on the GitHub side from the repository settings.
About building 4-5 times, I saw it on one of the referenced issues (or I believe so) :) 2 seems logical, one from GitHub service, one from RTD webhook but 4-5, I am not sure.
Thank you very much :) I guess this issue has been resolved.
@orbingol Thanks for following up and letting us know that this is resolved!