Skip to content

fix(github-actions): changed files output for editorcondig-checker #1180

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

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

oikarinen
Copy link
Contributor

Seems that ci.yml includes a dead dependency action just to get list of changed files for the PR / push. This seems weird as the repo is all about git. Propose removing this extra dep with straightforward implementation that supports force push for the PR branches.
Also:

  • github runners do have jq preinstalled, so that was redundant and now no longer needed.
  • separate the install step of the go dependency

Seems that ci.yml includes a dead dependency action just to get list of
changed files for the PR / push. This seems weird as the repo is all
about git. Propose removing this extra dep with straightforward
implemenation. Also: github runners do have `jq` preinstalled.
@oikarinen oikarinen force-pushed the changed-files branch 2 times, most recently from 2ca553e to 9d36a8f Compare November 24, 2024 19:06
Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

run: |
{
echo "added_modified<<EOF"
git diff --name-only "${BASE_SHA:-$BEFORE_SHA}...${HEAD_SHA:-GITHUB_REF}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would you print the diff result to the output so that we can check it if the CI doesn't work well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, this can be verified by running the github actions in debug mode, then github will log the contents of the env variable. But for sure it would be easier by just printing that in the step. I will amend!

@spacewander spacewander merged commit 0989b77 into tj:main Nov 26, 2024
5 checks passed
@spacewander
Copy link
Collaborator

@oikarinen
Merged. Thanks!

@spacewander
Copy link
Collaborator

@oikarinen
The CI on the main branch is broken now. Maybe you forget to add a $ before GITHUB_REF? I think you can verify the behavior from the push event by testing it on your own fork.

@oikarinen
Copy link
Contributor Author

@oikarinen The CI on the main branch is broken now. Maybe you forget to add a $ before GITHUB_REF? I think you can verify the behavior from the push event by testing it on your own fork.

Yeah that's it! i did test the pull_request and then called it good and the push path was not covered 🥹

@oikarinen
Copy link
Contributor Author

@spacewander here's the missing $ #1184

@oikarinen oikarinen deleted the changed-files branch December 25, 2024 10:12
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