Kegan Dougal
6924f44379
Merge branch 'kegan/github-mutex-on-register' into kegan/github-remove-hooks-on-webhook-event
8 years ago
Kegan Dougal
0e5716da1a
Add TODO explaining why the mutex storage is bad and what a better solution is
8 years ago
Kegan Dougal
b32cb06b74
Delete webhooks when receive webhook events for no known repository
8 years ago
Kegan Dougal
26a17ab3d6
Mutex-guard services with the same ID being modified concurrently
Also treat 422 "already exists" errors as success.
8 years ago
Kegsay
313c4ed92a
Merge pull request #43 from matrix-org/kegan/github-make-webhooks-on-register
Create delta webhooks in GithubService.Register()
8 years ago
Kegan Dougal
0f60be3ffc
Create delta webhooks in GithubService.Register()
Remove PostRegister() as it isn't used for anything anymore. Add TODO marker
for guarding against race conditions.
8 years ago
Kegan Dougal
5ac36551a6
Block comment on Github Register() to explain semantics and edge cases
8 years ago
Kegsay
9b649f001d
Merge pull request #39 from matrix-org/kegan/gh-service-client-id-is-opt
Client ID is optional when creating Github services
8 years ago
Kegan Dougal
569587aa6b
Log for nonsensical configs
8 years ago
Kegan Dougal
0ad4fc6135
Add TODO to parse the rest of the config to make sure no webhook config was supplied
8 years ago
Kegan Dougal
699b003c15
Client ID is optional when creating Github services
We only use it for making webhooks (to determine which GH account to load up).
We need it to be optional for the global GH bot to work (which has no account
and uses the account of whoever issued the !command to do the work).
8 years ago
Kegsay
d662d2e678
Merge pull request #38 from matrix-org/kegan/sync-on-startup
Start client sync streams on startup
8 years ago
Kegan Dougal
c7114907f6
Auto-join rooms if set in config
8 years ago
Kegan Dougal
8f8dec5539
Sync rooms on startup
8 years ago
Kegsay
42b547a5c5
Merge pull request #36 from matrix-org/kegan/github-cmd-expan-service
Change how Services are notified for incoming !commands and expansions
8 years ago
Kegan Dougal
b923d364ed
Indexes!
8 years ago
Kegan Dougal
97a292c65f
Change how Services are notified for incoming !commands and expansions
Previously, we would notify `Services` based on matching the `room_id` of the
event with a list of `RoomIDs()` which the service returned.
Now we notify `Services` based on matching the `user_id` of the client listening
for events. This means that the service will receive more events because there
isn't a filter on a set of room IDs.
This is required in order to implement "auto-join on invite" semantics for
Services, as the room ID is not known at that point in time.
8 years ago
Kegan Dougal
b45afac270
Add flags to control if the GH Service should handle expansions/commands
8 years ago
Kegan Dougal
25fb7ca0d9
Return Location headers on 302s
WriteHeader must come AFTER Header().Set() else it does nothing, yay!
8 years ago
Kegan Dougal
b643b8c797
Redirect even if already authed if a redirect URL is given
8 years ago
Kegan Dougal
de3dc5f33c
More logging
8 years ago
Kegan Dougal
479055748c
Log what the clients send us for debugging purposes
8 years ago
Kegan Dougal
cacdc632a4
More logging
8 years ago
Kegan Dougal
4d9574e6da
More logging
8 years ago
Kegan Dougal
ec9e462eab
Linting
8 years ago
Kegan Dougal
17824f74dc
Don't spam github with webhook creation requests which uses up our request rate limits
8 years ago
Kegan Dougal
cc076d0e9e
Paginate repo list
8 years ago
Kegan Dougal
6e2f35d463
Actually specify scopes...
8 years ago
Kegan Dougal
c3aabd57ea
Check for a valid session before exchanging codes
8 years ago
Kegsay
c38cf48b26
Merge pull request #35 from matrix-org/kegan/base64-paths
Base64 redirect and webhook paths
8 years ago
Kegan Dougal
24a2ffc6bb
Also apply base64 encoding to realm redirect paths and use URL-safe base64
8 years ago
Kegan Dougal
8e6955efd5
Base64 encode the service ID in the webhook path
We don't put any restrictions on the format of the Service ID so we need to
base64 it to prevent potentially losing data when it is inserted as a path
parameter (e.g. due to weird escaping rules).
Also, only remove webhooks if there was an old service to begin with.
8 years ago
Kegsay
8ddd4e83d0
Merge pull request #33 from matrix-org/kegan/jira-redirect
Add redirect URL for JIRA auth
8 years ago
Kegsay
d3ef0276fc
Merge pull request #32 from matrix-org/kegan/expand-with-groups
Change Expansion.Expand to include matching groups rather than just the match
8 years ago
Kegan Dougal
233e85eeee
Add redirect URL for JIRA auth
8 years ago
Kegsay
62e6ca7ce6
Merge pull request #31 from matrix-org/kegan/redirect
Add RedirectURL param when requesting GH auth sessions
8 years ago
Kegan Dougal
928a243ad2
Change Expansion.Expand to include matching groups rather than just the match
8 years ago
Kegan Dougal
17d799320e
Add RedirectURL param when requesting GH auth sessions
8 years ago
Kegsay
cc96cdc710
Merge pull request #30 from matrix-org/kegan/logging
Add LOG_DIR env var
8 years ago
Kegan Dougal
bfc5c8dd7f
Add LOG_DIR env var
8 years ago
Kegan Dougal
99ce940fe0
Add dugong for file logging
8 years ago
Kegsay
0ae43fab82
Merge pull request #29 from matrix-org/kegan/github-possible-repos
List possible GH repos on /getSession
8 years ago
Kegan Dougal
0e9411e559
s/Session/Info/ given it isn't an AuthSession object
8 years ago
Kegan Dougal
34eca3984f
List possible GH repos on /getSession
Add an Info() method to pull out info about an auth session.
8 years ago
Kegsay
d484a0a1d0
Update README.md
8 years ago
Kegsay
90b1c0f139
Update README.md
8 years ago
Kegsay
893114a584
Update README.md
8 years ago
Kegsay
9938b9bba7
Update README.md
8 years ago
Kegsay
326072519c
Merge pull request #28 from matrix-org/kegan/jira-starter-links
Implement JIRA Starter Links
8 years ago
Kegan Dougal
aab346e0fa
Tweak in-line JSON comment format
8 years ago