chore(events,catalog/github): update refresh key to match blob and tree
Signed-off-by: Rogerio Angeliski <angeliski@hotmail.com>
This commit is contained in:
@@ -961,6 +961,7 @@ describe('GithubEntityProvider', () => {
|
||||
expect(entityProviderConnection.refresh).toHaveBeenCalledWith({
|
||||
keys: [
|
||||
'url:https://github.com/test-org/test-repo/tree/main/catalog-info.yaml',
|
||||
'url:https://github.com/test-org/test-repo/blob/main/catalog-info.yaml',
|
||||
],
|
||||
});
|
||||
expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(0);
|
||||
@@ -1033,6 +1034,7 @@ describe('GithubEntityProvider', () => {
|
||||
expect(entityProviderConnection.refresh).toHaveBeenCalledWith({
|
||||
keys: [
|
||||
'url:https://github.com/test-org/test-repo/tree/my-special-branch/catalog-info.yaml',
|
||||
'url:https://github.com/test-org/test-repo/blob/my-special-branch/catalog-info.yaml',
|
||||
],
|
||||
});
|
||||
expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(0);
|
||||
|
||||
@@ -336,9 +336,16 @@ export class GithubEntityProvider implements EntityProvider, EventSubscriber {
|
||||
|
||||
if (modified.length > 0) {
|
||||
await this.connection.refresh({
|
||||
keys: modified.map(
|
||||
filePath => `url:${event.repository.url}/tree/${branch}/${filePath}`,
|
||||
),
|
||||
keys: [
|
||||
...modified.map(
|
||||
filePath =>
|
||||
`url:${event.repository.url}/tree/${branch}/${filePath}`,
|
||||
),
|
||||
...modified.map(
|
||||
filePath =>
|
||||
`url:${event.repository.url}/blob/${branch}/${filePath}`,
|
||||
),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user