-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Teamcity webhook #18668
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
Closed
Closed
Teamcity webhook #18668
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c33926d
Create templates and translation strings.
strangedreamsNY 1585424
Create TeamCityHook form model.
strangedreamsNY 90890b8
Add translations
strangedreamsNY 626c5d3
Add Meta and HookHandler. No interface matching since TeamCity doesn'…
strangedreamsNY e26ea44
Wire in TeamCity Webhook New/Edit post handlers.
strangedreamsNY faa0f98
Add Routes
strangedreamsNY a04e2b8
Update Teamcity.png, remove hidden whitespace.
strangedreamsNY f7a5427
Create templates and translation strings.
strangedreamsNY b4f1d8a
Create TeamCityHook form model.
strangedreamsNY af787b4
Add translations
strangedreamsNY 6f685b7
Add Meta and HookHandler. No interface matching since TeamCity doesn'…
strangedreamsNY 0c00340
Wire in TeamCity Webhook New/Edit post handlers.
strangedreamsNY e5fd009
Add Routes
strangedreamsNY 634db8f
Update Teamcity.png, remove hidden whitespace.
strangedreamsNY 5948c25
Merge remote-tracking branch 'origin/teamcity_webhook' into teamcity_…
strangedreamsNY ffea42e
Rebase onto latest. Resolve merge conflicts.
strangedreamsNY ec32633
Revert "Add translations"
strangedreamsNY 86435f9
Add TeamCityHookForm.
strangedreamsNY cc51e42
Add Repo Webhooks for TeamCity with New and Edit handlers.
strangedreamsNY 47805cb
Add TeamCity New/Edit Post webhooks to routes.
strangedreamsNY cd5bbce
Fix TeamCity hook signatures and templates. Use new references.
strangedreamsNY 199510e
Added BearerToken property to HookTask
strangedreamsNY d0b1a3d
Replace Teamcity png logo with svg version
strangedreamsNY 25f83a9
Add unit tests for Teamcity meta and payload.
strangedreamsNY 7580432
Fix linting issues.
strangedreamsNY 33e6466
Rename properties/variables to use URL and ID instead of "Url" and "Id"
strangedreamsNY d76ee61
Add teamcity hook to docs for swagger gen.
strangedreamsNY 03f671a
Revert "update the comparison documents (#18669)"
strangedreamsNY cc9af8d
Revert "Restart zero worker if there is still work to do (#18658)"
strangedreamsNY b3f8e4b
Remove duplicate entries from rebase.
strangedreamsNY 0b7a62e
Merge branch 'main' into teamcity_webhook
zeripath 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
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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package webhook | ||
|
|
||
| import ( | ||
| "code.gitea.io/gitea/models" | ||
| "code.gitea.io/gitea/modules/log" | ||
| "encoding/json" | ||
firephreek marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
|
|
||
| type ( | ||
| TeamCityMeta struct { | ||
| HostUrl string `json:"host_url"` | ||
| AuthToken string `json:"auth_token"` | ||
| VcsRootId string `json:"vcs_root_id"` | ||
| } | ||
| ) | ||
|
|
||
| func GetTeamCityHook(w *models.Webhook) *TeamCityMeta { | ||
| s := &TeamCityMeta{} | ||
|
|
||
| if err := json.Unmarshal([]byte(w.Meta), s); err != nil { | ||
| log.Error("webhook.GetTeamCityHook(%d): %v", w.ID, err) | ||
| } | ||
|
|
||
| return s | ||
| } | ||
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.