-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Integrations: allow to pass more data about external versions #7692
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
94ae575
Integrations: allow to pass more data about external versions
stsewd d65001a
Merge branch 'master' into external-version-data
stsewd 1725a89
Fix merge conflicts
stsewd 874cccb
Merge branch 'master' into external-version-data
stsewd fe6429a
Merge branch 'master' into external-version-data
stsewd dc311bc
Merge branch 'master' into external-version-data
stsewd 103e93f
Black
stsewd 1bd70b2
This isn't used yet
stsewd 8465497
Improvements from review
stsewd 7daa7cc
black
stsewd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import base64 | ||
import datetime | ||
import json | ||
|
||
from unittest import mock | ||
|
||
from allauth.socialaccount.models import SocialAccount | ||
from django.contrib.auth.models import User | ||
from django.http import QueryDict | ||
|
@@ -16,13 +16,13 @@ | |
GITHUB_CREATE, | ||
GITHUB_DELETE, | ||
GITHUB_EVENT_HEADER, | ||
GITHUB_PUSH, | ||
GITHUB_SIGNATURE_HEADER, | ||
GITHUB_PULL_REQUEST, | ||
GITHUB_PULL_REQUEST_CLOSED, | ||
GITHUB_PULL_REQUEST_OPENED, | ||
GITHUB_PULL_REQUEST_REOPENED, | ||
GITHUB_PULL_REQUEST_CLOSED, | ||
GITHUB_PULL_REQUEST_SYNC, | ||
GITHUB_PUSH, | ||
GITHUB_SIGNATURE_HEADER, | ||
GITLAB_MERGE_REQUEST, | ||
GITLAB_MERGE_REQUEST_CLOSE, | ||
GITLAB_MERGE_REQUEST_MERGE, | ||
|
@@ -37,7 +37,7 @@ | |
GitLabWebhookView, | ||
) | ||
from readthedocs.api.v2.views.task_views import get_status_data | ||
from readthedocs.builds.constants import LATEST, EXTERNAL | ||
from readthedocs.builds.constants import EXTERNAL, LATEST | ||
from readthedocs.builds.models import Build, BuildCommandResult, Version | ||
from readthedocs.integrations.models import Integration | ||
from readthedocs.oauth.models import RemoteOrganization, RemoteRepository | ||
|
@@ -48,7 +48,6 @@ | |
Project, | ||
) | ||
|
||
|
||
super_auth = base64.b64encode(b'super:test').decode('utf-8') | ||
eric_auth = base64.b64encode(b'eric:test').decode('utf-8') | ||
|
||
|
@@ -840,9 +839,13 @@ def setUp(self): | |
"number": 2, | ||
"pull_request": { | ||
"head": { | ||
"sha": self.commit | ||
} | ||
} | ||
"sha": self.commit, | ||
"ref": 'source_branch', | ||
}, | ||
"base": { | ||
"ref": "master", | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't seem to be testing any of these additional fields? |
||
}, | ||
} | ||
self.gitlab_merge_request_payload = { | ||
"object_kind": GITLAB_MERGE_REQUEST, | ||
|
@@ -851,7 +854,9 @@ def setUp(self): | |
"last_commit": { | ||
"id": self.commit | ||
}, | ||
"action": "open" | ||
"action": "open", | ||
"source_branch": "source_branch", | ||
"target_branch": "master", | ||
}, | ||
} | ||
self.gitlab_payload = { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a worse error message, we should clarify why it's invalid.