Skip to content

Commit b3a2a9f

Browse files
test workflow; capture issue or pr number in variable
1 parent e767c8d commit b3a2a9f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/docs.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,18 @@ jobs:
8383
uses: actions/github-script@v7
8484
with:
8585
script: |
86+
const prNumber = context.pull_request?.number || context.issue?.number;
87+
if (!prNumber) {
88+
console.log('Could not find a valid pull request or issue number.');
89+
return;
90+
}
8691
const message = `
8792
Link to ReadTheDocs sample build for this PR can be found at:
8893
https://nws-hpc-standards--${{ github.event.pull_request.number }}.org.readthedocs.build/en/${{ github.event.pull_request.number }}
8994
`
9095
github.rest.issues.createComment({
91-
issue_number: context.pull_request.number,
96+
# issue_number: context.issue.number,
97+
issue_number: prNumber,
9298
owner: context.repo.owner,
9399
repo: context.repo.repo,
94100
body: message

docs/standards.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Variables that are not used in a given job need not be defined (keep the ``J-job
9898
"``SENDDBN``","Boolean [#bool]_ variable used to control sending products off WCOSS2","job card"
9999
"``SENDDBN_NTC``","Boolean [#bool]_ variable used to control sending products with WMO headers off WCOSS2","job card"
100100
"``SENDCOM``","Boolean [#bool]_ variable to control data copies to ``$COMOUT``","job card"
101-
"``SENDWEB``","Boolean [#]_ variable used to control sending products to a web server, often ncorzdm","job card"
101+
"``SENDWEB``","Boolean [#bool]_ variable used to control sending products to a web server, often ncorzdm","job card"
102102
"``model_ver``","version number of package in three digits; where ``package`` is the model's directory name","job card"
103103
"``module_ver``","Version of module ``module`` which is used at runtime by model ``model``","version file"
104104
"``extmodel_ver``","version of external model dependencies; specified with two digit version number","version file"

0 commit comments

Comments
 (0)