-
Notifications
You must be signed in to change notification settings - Fork 22
Attempt to fix #151 #293
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
Attempt to fix #151 #293
Conversation
src/github.ts
Outdated
@@ -84,10 +84,25 @@ query lastCommitDate($owner: String!, $repo: String!, $ref: String!, $path: Stri | |||
) | |||
} | |||
|
|||
const {edges} = result.repository.ref.target.history | |||
const {history} = result.repository.ref.target |
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.
I test the code, result.repository.ref
this is null, so result.repository.ref.target
throws cannot read property 'target' of null
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.
Looks really strange. Seems Github's graphql API has unexpected behavior in some rare cases.
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.
Could you try again?
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.
Error: Unable to retrieve history for path 'libduckdb-sys' (res: {"repository":{"ref":null}})
I think we can disable these logic, and just check the published version? |
Seems related to inner package? |
@wangfenjin Seems the problem related to API request: query lastCommitDate($owner: String!, $repo: String!,
$ref: String!, $path: String!) {
repository(owner: $owner, name: $repo) {
ref(qualifiedName: $ref) {
target {
... on Commit {
history(first: 1, path: $path) {
edges {
node {
committedDate
}
}
}
}
}
}
}
} Request data: {
"owner": "wangfenjin",
"repo": "duckdb-rs",
"ref": "refs/remotes/pull/23/merge",
"path": "libduckdb-sys"
} Response from GitHub: {
"data": {
"repository": {
"ref": null
}
}
} We may try to find solution or bypass this logic as a quick fix. NOTE: This check prevents forgetting to change version of package which contents changed since previously published version so bypassing this logic little bit dangerous. |
@wangfenjin At all I think publishing packages using pull-requests is not so good idea in any case. I suggest you use tags for that purpose. |
Seems we can get last path modification time locally via git. |
Agree. For that because it's the first time using github action to release, so I want to make it work before merge the code. So you mean, after merge to master all things should work? What about the dry-run mode, is it work in PR? Because every PR should run the dry-run mode |
@wangfenjin Currently I'm on a way to change implementation of this feature. New implementation will deal with local clone of repository directly without using octokit. Also it will checks contents of packages more fine grained i.e. file by file. |
Closed in favor of #311 |
@wangfenjin Could you test pr #311 ? |
No description provided.