-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
11 changes: 9 additions & 2 deletions
11
...ib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/CodyContextFilterItem.kt
This file contains 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,15 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
data class CodyContextFilterItem( | ||
val repoNamePattern: String, | ||
val repoNamePattern: RepoNamePatternEnum, // Oneof: .* | ||
val filePathPatterns: List<String>? = null, | ||
) | ||
) { | ||
|
||
enum class RepoNamePatternEnum { | ||
@SerializedName(".*") Wildcard, | ||
} | ||
} | ||
|
This file contains 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
Empty file.
This file contains 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,21 @@ | ||
#!/usr/bin/env python3 | ||
import json | ||
import time | ||
from datetime import datetime | ||
|
||
def generate_credentials(): | ||
current_epoch = int(time.time()) + 100 | ||
|
||
credentials = { | ||
"headers": { | ||
"Authorization": "Bearer SomeUser", | ||
"Expiration": current_epoch, | ||
}, | ||
"expiration": current_epoch | ||
} | ||
|
||
# Print JSON to stdout | ||
print(json.dumps(credentials)) | ||
|
||
if __name__ == "__main__": | ||
generate_credentials() |
This file contains 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 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 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 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