Skip to content

Commit fdad22f

Browse files
committed
formatting issue
1 parent 2660559 commit fdad22f

File tree

1 file changed

+60
-59
lines changed

1 file changed

+60
-59
lines changed

.github/workflows/ontology_diff_comment.yml

+60-59
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,70 @@
11
# name: Post Markdown Comment on Pull Request
22

33
# on:
4-
# workflow_dispatch:
5-
# pull_request:
6-
# types: [opened, synchronize]
4+
# workflow_dispatch:
5+
# pull_request:
6+
# types: [opened, synchronize]
77

88
# jobs:
9-
# post-comment:
10-
# runs-on: ubuntu-latest
9+
# post-comment:
10+
# runs-on: ubuntu-latest
1111

12-
# steps:
13-
# - name: Checkout repository
14-
# uses: actions/checkout@v4
12+
# steps:
13+
# - name: Checkout repository
14+
# uses: actions/checkout@v4
1515

16-
# - name: Set up Python 3.10
17-
# uses: actions/setup-python@v5
18-
# with:
19-
# python-version: '3.10'
16+
# - name: Set up Python 3.10
17+
# uses: actions/setup-python@v5
18+
# with:
19+
# python-version: '3.10'
2020

21-
# - name: Install oaklib
22-
# run: pip install git+https://github.com/INCATools/ontology-access-kit.git@release-notes-emit
21+
# - name: Install oaklib
22+
# run: pip install git+https://github.com/INCATools/ontology-access-kit.git@release-notes-emit
2323

24-
# - name: Run make diff-md
25-
# run: |
26-
# cd src/ontology
27-
# make diff-md
24+
# - name: Run make diff-md
25+
# run: |
26+
# cd src/ontology
27+
# make diff-md
28+
29+
# # Post or update comment on pull request if difference_md.md exists
30+
# - name: Post or update comment on pull request
31+
# uses: actions/github-script@v7
32+
# with:
33+
# script: |
34+
# const fs = require('fs');
35+
# const path = 'src/ontology/reports/difference_md.md';
36+
# if (fs.existsSync(path)) {
37+
# const content = fs.readFileSync(path, 'utf8');
38+
# console.log("Content of the markdown file:");
39+
# console.log(content); // Debug print of the file content
40+
# if (content) {
41+
# const { owner, repo } = context.repo;
42+
# const { number } = context.issue;
43+
# const existingComments = await github.rest.issues.listComments({
44+
# owner,
45+
# repo,
46+
# issue_number: number
47+
# });
48+
# const existingComment = existingComments.data.find(comment => comment.user.login === 'github-actions[bot]');
49+
# if (existingComment) {
50+
# await github.rest.issues.updateComment({
51+
# owner,
52+
# repo,
53+
# comment_id: existingComment.id,
54+
# body: content
55+
# });
56+
# } else {
57+
# await github.rest.issues.createComment({
58+
# owner,
59+
# repo,
60+
# issue_number: number,
61+
# body: content
62+
# });
63+
# }
64+
# } else {
65+
# console.log("The markdown file is empty."); // Debug print if the file is empty
66+
# }
67+
# } else {
68+
# console.log("The markdown file does not exist."); // Debug print if the file does not exist
69+
# }
2870

29-
# # Post or update comment on pull request if difference_md.md exists
30-
# - name: Post or update comment on pull request
31-
# uses: actions/github-script@v7
32-
# with:
33-
# script: |
34-
# const fs = require('fs');
35-
# const path = 'src/ontology/reports/difference_md.md';
36-
# if (fs.existsSync(path)) {
37-
# const content = fs.readFileSync(path, 'utf8');
38-
# console.log("Content of the markdown file:");
39-
# console.log(content); // Debug print of the file content
40-
# if (content) {
41-
# const { owner, repo } = context.repo;
42-
# const { number } = context.issue;
43-
# const existingComments = await github.rest.issues.listComments({
44-
# owner,
45-
# repo,
46-
# issue_number: number
47-
# });
48-
# const existingComment = existingComments.data.find(comment => comment.user.login === 'github-actions[bot]');
49-
# if (existingComment) {
50-
# await github.rest.issues.updateComment({
51-
# owner,
52-
# repo,
53-
# comment_id: existingComment.id,
54-
# body: content
55-
# });
56-
# } else {
57-
# await github.rest.issues.createComment({
58-
# owner,
59-
# repo,
60-
# issue_number: number,
61-
# body: content
62-
# });
63-
# }
64-
# } else {
65-
# console.log("The markdown file is empty."); // Debug print if the file is empty
66-
# }
67-
# } else {
68-
# console.log("The markdown file does not exist."); // Debug print if the file does not exist
69-
# }

0 commit comments

Comments
 (0)