-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: close assigned issue logic #1157
fix: close assigned issue logic #1157
Conversation
- updated devpool issue logic - wrote tests to confirm that existing logic works well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue persists
Current behaviour when project issue is assigned and devpool issue is open:
- 1st
index.ts
run closes devpool issue - 2nd
index.ts
run opens devpool issue - 3rd (and all other)
index.ts
run closes devpool issue
After locally testing, the test Error: expect(received).toMatchObject(expected)
- Expected - 3
+ Received + 9
@@ -22,11 +22,11 @@
"subscriptions_url": "",
"type": "",
"url": "",
},
"author_association": "NONE",
- "body": "body",
+ "body": "https://github.com/ubiquity/test-repo/issues/1",
"closed_at": null,
"comments": 0,
"comments_url": "",
"created_at": "",
"events_url": "",
@@ -35,23 +35,29 @@
"labels": Array [
Object {
"name": "Pricing: 200 USD",
},
Object {
- "name": "Time: 1h",
+ "name": "Partner: ubiquity/test-repo",
},
Object {
"name": "id: 1",
+ },
+ Object {
+ "name": "Unavailable",
},
+ Object {
+ "name": "Time: 1h",
+ },
],
"labels_url": "",
"locked": false,
"milestone": null,
"node_id": "1",
"number": 1,
"repository_url": "https://github.com/ubiquity/devpool-directory",
- "state": "closed",
+ "state": "open",
"title": "issue",
"updated_at": "",
"url": "",
"user": null,
}, |
repo: "test-repo", | ||
}); | ||
await main(); | ||
const devpoolIssue = await getAllIssues(DEVPOOL_OWNER_NAME, DEVPOOL_REPO_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const devpoolIssue = await getAllIssues(DEVPOOL_OWNER_NAME, DEVPOOL_REPO_NAME); | |
const devpoolIssues = await getAllIssues(DEVPOOL_OWNER_NAME, DEVPOOL_REPO_NAME); |
I'm closing this PR, I think this issue had already been solved by @rndquu |
closes: #23
Solution
I realized that the existing logic for closing assigned issues works correctly, but the logic for updating issue always reopens the issue again
You can see this behaviour on this issue or on the screenshot below
Change