Repository navigation
Enables PR Status to be updated independently of PRs - #3132
Conversation
Since PRStatus can be retrieved seperately from the PRs, we need a way to relate the two back together.
To make sure the CI never uses a different version of node, I've removed the upgrade command
|
Did you mean to open this against |
This could result in pull requests having no status since a status may not be loaded in the database yet
| import { GitHubRepository } from '../../../models/github-repository' | ||
|
|
||
| const PullRequestInterval = 1000 * 60 * 3 | ||
| const StatusInterval = 1000 * 60 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I worked on this PR too, so someone else will need to review it 🙏 |
| PushedPullRequest = 'PushedPullRequestHandle', | ||
| } | ||
|
|
||
| export class PullRequestUpdater { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
shiftkey
left a comment
There was a problem hiding this comment.
Looking good. A few little things to call out, but tested it out fine in macOS just now.
| return | ||
| } | ||
|
|
||
| if (!repository.gitHubRepository) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| import { GitHubRepository } from '../../../models/github-repository' | ||
|
|
||
| const PullRequestInterval = 1000 * 60 * 3 | ||
| const StatusInterval = 1000 * 60 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| this.pullRequests = await this.getPullRequests(repository) | ||
| this.emitUpdate() | ||
| } catch (error) { | ||
| log.warn(`Error refreshing pull requests for '${repository.name}`) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| ) | ||
|
|
||
| return | ||
| return -1 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| import { PullRequest } from '../../../models/pull-request' | ||
| import { GitHubRepository } from '../../../models/github-repository' | ||
|
|
||
| const PullRequestInterval = 1000 * 60 * 3 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🐰 |
| prStatus.state === 'failure' | ||
| ) { | ||
| this.currentPullRequests = this.currentPullRequests.filter( | ||
| p => p.number === prStatus.pullRequestNumber |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
shiftkey
left a comment
There was a problem hiding this comment.
Apologies for the mixed up review, I shouldn't be allowed to do things before ☕.
| } | ||
|
|
||
| private async writePullRequests( | ||
| private async writePRs( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
☘️ |
Fixes #3019
Fixes #3020