Skip to content

Commit

Permalink
fix: use correct id
Browse files Browse the repository at this point in the history
  • Loading branch information
janl committed Feb 7, 2019
1 parent 115100b commit 8ca6e1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/create-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ module.exports = async (

/*
This is the structure of the tokens 'model'
_id: `${installationId}
_id: `${accountId}
tokens: {
${repoId}: {
npm: ${token},
Expand All @@ -129,7 +129,7 @@ module.exports = async (
let execTokens = ''
let repositoryTokens = ''
try {
repositoryTokens = await tokens.get(installationId)
repositoryTokens = await tokens.get(repoDoc.accountId)
} catch (error) {
log.error(`Unable to get repository token`, { lockfilePath, error })
}
Expand Down
2 changes: 1 addition & 1 deletion test/lib/create-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ describe('create branch with lockfiles', async () => {
test('change one file (package.json) and generate its lockfile with tokens', async () => {
const { tokens, 'token-audits': tokenAudits } = await dbs() // eslint-disable-line
await tokens.put({
_id: '123',
_id: '124',
tokens: {
'one-lockfile-with-token': {
npm: '12345',
Expand Down

0 comments on commit 8ca6e1b

Please sign in to comment.