Skip to content

Commit

Permalink
Rename organisation to owner
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Dec 20, 2024
1 parent 845527c commit 9b4bc81
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ const pathToReminders = process.argv[2] || 'reminders.yaml';
const config = {
repositories: {
'acuminous/foo': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'foo',
driver: 'github',
},
'acuminous/bar': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'bar',
driver: 'github',
},
Expand Down
4 changes: 2 additions & 2 deletions examples/personal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const pathToReminders = process.argv[2] || 'reminders.yaml';
const config = {
repositories: {
'acuminous/foo': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'foo',
driver: 'github',
},
'acuminous/bar': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'bar',
driver: 'github',
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/knuff.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ describe('knuff', () => {

const repositories = {
'acuminous/foo': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'foo',
driver: 'github',
},
'acuminous/bar': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'bar',
driver: 'github',
},
'acuminous/baz': {
organisation: 'acuminous',
owner: 'acuminous',
name: 'baz',
driver: 'gitlab',
},
Expand Down
8 changes: 4 additions & 4 deletions test/lib/StubDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ class StubDriver {
}

async findIssue(repository, reminderId) {
const key = this.#getRepositoryKey(repository.organisation, repository.name);
const key = this.#getRepositoryKey(repository.owner, repository.name);
const { issues } = this.#repositories[key] || this.#initRepository();
return issues.find((issue) => issue.labels.find((label) => label === reminderId));
}

async createIssue(repository, reminderId, issue) {
const key = this.#getRepositoryKey(repository.organisation, repository.name);
const key = this.#getRepositoryKey(repository.owner, repository.name);
this.#repositories[key] = this.#repositories[key] || this.#initRepository();
const labels = [].concat(issue.labels || [], reminderId);
this.#repositories[key].issues.push({ ...issue, labels });
}

#getRepositoryKey(organisation, name) {
return `${organisation}/${name}`;
#getRepositoryKey(owner, name) {
return `${owner}/${name}`;
}

#initRepository() {
Expand Down

0 comments on commit 9b4bc81

Please sign in to comment.