Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github build status reporting bug #5985

Merged
merged 7 commits into from
Jul 31, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion readthedocs/oauth/services/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from readthedocs.api.v2.client import api
from readthedocs.builds import utils as build_utils
from readthedocs.builds.constants import (
BUILD_STATUS_PENDING,
SELECT_BUILD_STATUS,
RTD_BUILD_STATUS_API_NAME
)
Expand Down Expand Up @@ -329,7 +330,11 @@ def send_build_status(self, build, state):
session = self.get_session()
project = build.project
owner, repo = build_utils.get_github_username_repo(url=project.repo)
build_sha = build.version.identifier

if state == BUILD_STATUS_PENDING:
build_sha = build.version.identifier
else:
build_sha = build.commit

# select the correct state and description.
github_build_state = SELECT_BUILD_STATUS[state]['github']
Expand Down