Skip to content

Commit

Permalink
Merge branch 'main' into feat/always_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov committed Feb 12, 2025
2 parents 1784656 + f3aaa2b commit 8d36c05
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ jobs:
shell: bash
run: |
error_message="${{ steps.missing-required.outputs.error }}"
expected_message="Resource not accessible by integration - \
https://docs.github.com/rest/issues/comments#create-an-issue-comment"
expected_message="Missing required parameter: image"
if [[ ! "$error_message" =~ "$expected_message" ]]; then
echo "Expected error message to contain: $expected_message"
Expand Down
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const image = core.getInput('image');
if (!image) {
error('Missing required parameter: image');
return;
}
const configFile = core.getInput('config-file');
// Convert always-comment input to boolean value.
// All values other than 'true' are considered false.
Expand All @@ -147,7 +151,6 @@ function run() {
if (!hasConfigFile && configFile !== configFileDefaultPath) {
error(`Config file not found in the specified path '${configFile}'\n` +
`github.workspace value is: '${process.env.GITHUB_WORKSPACE}'`);
return;
}
if (hasConfigFile) {
commandOptions.push('--mount', `type=bind,source=${configFile},target=/.dive-ci`);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ function error(message: string): void {
async function run(): Promise<void> {
try {
const image = core.getInput('image')
if (!image) {
error('Missing required parameter: image')
return
}
const configFile = core.getInput('config-file')
// Convert always-comment input to boolean value.
// All values other than 'true' are considered false.
Expand Down Expand Up @@ -99,7 +103,6 @@ async function run(): Promise<void> {
`Config file not found in the specified path '${configFile}'\n` +
`github.workspace value is: '${process.env.GITHUB_WORKSPACE}'`
)
return
}

if (hasConfigFile) {
Expand Down

0 comments on commit 8d36c05

Please sign in to comment.