Skip to content

implement the RaobModelPressureLevelBuilderV01 #1

implement the RaobModelPressureLevelBuilderV01

implement the RaobModelPressureLevelBuilderV01 #1

Workflow file for this run

name: ADR proposed
on:
issues:
types:
- labeled
jobs:
main:
name: ADR proposed
runs-on: ubuntu-latest
# Only run this workflow if the issue is open and has the "ADR" label
if: "${{github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'ADR') }}"
steps:
- name: add comment if appropriate
uses: actions/github-script@v7
with:
script: |
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const botHasCommented = comments.some(({ user: { login }}) => login === 'github-actions[bot]');
if(!botHasCommented) {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This issue appears to be a draft or in-progress ADR. When it is completed and accepted, add the `ADR: Accepted` label and close the issue. This will start a process to create the ADR document and add it to the repo automatically. If you close the issue before adding the label, simply re-open and re-close it.'
});
}