Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
#466 react on synchronize (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
prayerslayer authored Oct 27, 2016
1 parent b942593 commit ce66a3c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/checks/PullRequestLabels.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class PullRequestLabels extends Check {
const repoName = repository.name
const fullName = repository.full_name
try {
if (['labeled', 'unlabeled', 'opened', 'reopened'].indexOf(action) !== -1 && pull_request.state === 'open') {
if (['labeled', 'unlabeled', 'opened', 'reopened', 'synchronize'].indexOf(action) !== -1 && pull_request.state === 'open') {
await this.fetchLabelsAndSetStatus({repository, pull_request, token, config})
}
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion server/checks/PullRequestTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class PullRequestTasks extends Check {
let status;

try {
if (pull_request.state === 'open' && ['opened', 'edited', 'reopened'].indexOf(action) !== -1) {
if (pull_request.state === 'open' && ['opened', 'edited', 'reopened', 'synchronize'].indexOf(action) !== -1) {
await this.countTasksAndSetStatus({pull_request, repository, token})
}
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions test/server/pullrequestlabels.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ describe('Pull Request Labels', () => {
}
}
}
const REACT_ON = ['labeled', 'unlabeled', 'opened', 'reopened']
const IGNORE = ['synchronize', 'assigned', 'unassigned', 'closed', 'edited']
const REACT_ON = ['labeled', 'unlabeled', 'opened', 'reopened', 'synchronize']
const IGNORE = ['assigned', 'unassigned', 'closed', 'edited']
const ALL = [...REACT_ON, ...IGNORE]
ALL.forEach(action =>
it(`ignores everything with state = closed`, async(done) => {
Expand Down
4 changes: 2 additions & 2 deletions test/server/pullrequesttasks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ describe('Pull Request Tasks', () => {
}
}
const CONFIG = {}
const REACT_ON = ['opened', 'edited', 'reopened']
const IGNORE = ['synchronize', 'assigned', 'unassigned', 'closed', 'labeled', 'unlabeled']
const REACT_ON = ['opened', 'edited', 'reopened', 'synchronize']
const IGNORE = ['assigned', 'unassigned', 'closed', 'labeled', 'unlabeled']
const ALL = [...REACT_ON, ...IGNORE]

ALL.forEach(action =>
Expand Down

0 comments on commit ce66a3c

Please sign in to comment.