Skip to content

Commit 9d740b1

Browse files
committed
fix yaml indent
1 parent 3c91a21 commit 9d740b1

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

.github/workflows/build-without-lockfile.yml

+31-28
Original file line numberDiff line numberDiff line change
@@ -43,42 +43,45 @@ jobs:
4343
if: failure() && github.event_name == 'pull_request'
4444
with:
4545
github-token: ${{secrets.GITHUB_TOKEN}}
46-
script: |
47-
const issue_number = context.issue.number;
48-
const owner = context.repo.owner;
49-
const repo = context.repo.repo;
46+
script: |
47+
const issue_number = context.issue.number;
48+
const owner = context.repo.owner;
49+
const repo = context.repo.repo;
50+
const runUrl = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
5051
51-
const commentBody = `Unable to build without Cargo.lock file.
52+
const commentBody = `Unable to build without Cargo.lock file.
5253
53-
This means that after this change 3rd party projects may have
54-
difficulties using crates in this repo as a dependency. If this
55-
isn't easy to fix please open an issue so we can fix it later.
54+
This means that after this change 3rd party projects may have
55+
difficulties using crates in this repo as a dependency. If this
56+
isn't easy to fix please open an issue so we can fix it later.
5657
57-
To reproduce locally run
58+
For the failing build see: ${runUrl}
5859
59-
\`\`\`
60-
cargo generate-lockfile
61-
cargo check --all-targets
62-
\`\`\`
60+
To reproduce locally run
6361
64-
This PR can still be merged.`;
62+
\`\`\`
63+
cargo generate-lockfile
64+
cargo check --all-targets
65+
\`\`\`
6566
66-
// Fetch existing comments
67-
const { data: comments } = await github.rest.issues.listComments({
68-
owner,
69-
repo,
70-
issue_number,
71-
});
67+
This PR can still be merged.`;
7268
73-
// Find existing comment
74-
const existingComment = comments.find(c => c.body == commentBody);
75-
if (!existingComment) {
76-
await github.rest.issues.createComment({
69+
// Fetch existing comments
70+
const { data: comments } = await github.rest.issues.listComments({
7771
owner,
7872
repo,
7973
issue_number,
80-
body: commentBody
8174
});
82-
} else {
83-
console.log("Already commentted.")
84-
}
75+
76+
// Find existing comment
77+
const existingComment = comments.find(c => c.body == commentBody);
78+
if (!existingComment) {
79+
await github.rest.issues.createComment({
80+
owner,
81+
repo,
82+
issue_number,
83+
body: commentBody
84+
});
85+
} else {
86+
console.log("Already commentted.")
87+
}

0 commit comments

Comments
 (0)