Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 1369fc5

Browse files
authored
Merge pull request #18 from jonabc/skip-archived-cards
Don't include archived project cards in query
2 parents 20e1aa0 + 949bc79 commit 1369fc5

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/graphql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ url
3030
project {
3131
name
3232
}
33-
cards(first: 50) {
33+
cards(first: 50, archivedStates: [NOT_ARCHIVED]) {
3434
nodes {
3535
${projectCardFields}
3636
}

test/linked-project-columns.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,17 @@ describe('linked-project-columns', () => {
472472
// no call to delete the item from the target column
473473
});
474474

475+
it('does not include archived cards', async () => {
476+
await run();
477+
478+
expect(core.warning.callCount).toEqual(0);
479+
expect(core.setFailed.callCount).toEqual(0);
480+
expect(api.callCount).toEqual(2);
481+
// call 0 -> get columns
482+
// call 1 -> add automation note
483+
expect(api.getCall(0).args[0]).toContain('archivedStates: [NOT_ARCHIVED]');
484+
});
485+
475486
describe('with multiple source columns', () => {
476487
const secondSourceColumnId = 'second';
477488

0 commit comments

Comments
 (0)