rafmacalaba commited on
Commit
dc0ab7b
·
1 Parent(s): da957b0

fix: add isPullRequest to all HF commits (403 Forbidden)

Browse files
Files changed (2) hide show
  1. app/api/validate/route.js +2 -0
  2. utils/storage.js +1 -0
app/api/validate/route.js CHANGED
@@ -83,6 +83,7 @@ export async function PUT(request) {
83
  repo: { type: 'dataset', name: HF_DATASET_ID },
84
  credentials: { accessToken: token },
85
  title: `Validate dataset in doc_${document_index} page ${page_number}`,
 
86
  operations: [{
87
  operation: 'addOrUpdate',
88
  path: repoPath,
@@ -163,6 +164,7 @@ export async function DELETE(request) {
163
  repo: { type: 'dataset', name: HF_DATASET_ID },
164
  credentials: { accessToken: token },
165
  title: `Delete dataset from doc_${document_index} page ${page_number}`,
 
166
  operations: [{
167
  operation: 'addOrUpdate',
168
  path: repoPath,
 
83
  repo: { type: 'dataset', name: HF_DATASET_ID },
84
  credentials: { accessToken: token },
85
  title: `Validate dataset in doc_${document_index} page ${page_number}`,
86
+ isPullRequest: true,
87
  operations: [{
88
  operation: 'addOrUpdate',
89
  path: repoPath,
 
164
  repo: { type: 'dataset', name: HF_DATASET_ID },
165
  credentials: { accessToken: token },
166
  title: `Delete dataset from doc_${document_index} page ${page_number}`,
167
+ isPullRequest: true,
168
  operations: [{
169
  operation: 'addOrUpdate',
170
  path: repoPath,
utils/storage.js CHANGED
@@ -81,6 +81,7 @@ async function commitDocToHF(docIndex, pagesData, commitMessage) {
81
  repo: { type: 'dataset', name: HF_DATASET_ID },
82
  credentials: { accessToken: token },
83
  title: commitMessage,
 
84
  operations: [{
85
  operation: 'addOrUpdate',
86
  path: repoPath,
 
81
  repo: { type: 'dataset', name: HF_DATASET_ID },
82
  credentials: { accessToken: token },
83
  title: commitMessage,
84
+ isPullRequest: true,
85
  operations: [{
86
  operation: 'addOrUpdate',
87
  path: repoPath,