Skip to content

Commit 3bb1dee

Browse files
Bump actions/github-script from 4.1 to 6 (#62)
* Bump actions/github-script from 4.1 to 6 Bumps [actions/github-script](https://github.com/actions/github-script) from 4.1 to 6. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v4.1...v6) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix the actions script Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Keewis <[email protected]>
1 parent 06385cf commit 3bb1dee

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/nightly.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
shopt -s globstar
116116
python .github/workflows/format-report.py logs/**/*-log sphinx-log.txt
117117
- name: Report failures
118-
uses: actions/github-script@v4.1
118+
uses: actions/github-script@v6
119119
with:
120120
github-token: ${{ secrets.GITHUB_TOKEN }}
121121
script: |
@@ -139,32 +139,29 @@ jobs:
139139
}
140140
}
141141
}`;
142+
142143
const variables = {
143144
owner: context.repo.owner,
144145
name: context.repo.repo,
145146
label: 'CI',
146147
creator: "github-actions[bot]"
147148
}
148149
const result = await github.graphql(query, variables)
149-
const issue_info = result.repository.issues.edges[0].node
150-
// If no issue is open, create a new issue, else update the
151-
// body of the existing issue.
152-
if (typeof issue_info.number === 'undefined') {
150+
153151
// If no issue is open, create a new issue,
154152
// else update the body of the existing issue.
155153
if (result.repository.issues.edges.length === 0) {
156-
github.issues.create({
154+
github.rest.issues.create({
157155
owner: variables.owner,
158156
repo: variables.name,
159157
body: issue_body,
160158
title: title,
161159
labels: [variables.label]
162160
})
163161
} else {
164-
github.issues.update({
162+
github.rest.issues.update({
165163
owner: variables.owner,
166164
repo: variables.name,
167-
issue_number: issue_info.number,
168165
issue_number: result.repository.issues.edges[0].node.number,
169166
body: issue_body
170167
})

0 commit comments

Comments
 (0)