We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e15371 commit 649f960Copy full SHA for 649f960
.github/workflows/issue-write.yml
@@ -77,6 +77,15 @@ jobs:
77
}
78
const gql_result = await github.graphql(gql_query, gql_variables);
79
console.log(gql_result);
80
+ // If the branch for the PR was deleted before this job has a chance
81
+ // to run, then the ref will be null. This can happen if someone:
82
+ // 1. Rebase the PR, which triggers some workflow.
83
+ // 2. Immediately merges the PR and deletes the branch.
84
+ // 3. The workflow finishes and triggers this job.
85
+ if (!gql_result.repository.ref) {
86
+ console.log("Ref has been deleted");
87
+ return;
88
+ }
89
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
90
91
var pr_number = 0;
0 commit comments