Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change warning annotations to notices regarding ignored inputs #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vanley
Copy link

@Vanley Vanley commented Jun 7, 2024

When input parameter is ignored, annotation should just inform about it.

Available annotations on the github actions (https://github.com/actions/toolkit/tree/main/packages/core):
image

Comment on lines 92 to 94
if (base) {
core.warning(`'base' input parameter is ignored when action is triggered by pull request event`)
core.notice(`'base' input parameter is ignored when action is triggered by pull request event`)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be even deleted altogether. base is used now when the action is triggered by a pull request event.

return await git.getChanges(base || baseSha || defaultBranch, currentRef)

Commit that switched to this behavior: 5266f0a

Comment on lines 89 to 91
if (ref) {
core.warning(`'ref' input parameter is ignored when 'base' is set to HEAD`)
core.notice(`'ref' input parameter is ignored when 'base' is set to HEAD`)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be deleted too, I think. I don't see any if clause here that evaluates base === git.HEAD like for the return statement above.

paths-filter/src/main.ts

Lines 80 to 85 in de90cc6

if (base === git.HEAD) {
if (ref) {
core.warning(`'ref' input parameter is ignored when 'base' is set to HEAD`)
}
return await git.getChangesOnHead()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants