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

Respect style of each action when mixed styles are used #8068

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

deivid-rodriguez
Copy link
Contributor

Fixes #7971.

For example, on https://github.com/getlogbook/logbook:

Before

± .github/workflows/wheel-builder.yml
~~~
--- /tmp/original20230919-234-sgikwf	2023-09-19 17:36:17.144755893 +0000
+++ /tmp/updated20230919-234-cdm607	2023-09-19 17:36:17.144755893 +0000
@@ -25,7 +25,7 @@
     name: Build sdist
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+      - uses: actions/checkout@v4 # v3.5.3
         with:
           # The tag to build or the tag received by the tag event
           ref: ${{ github.event.inputs.version || github.ref }}
@@ -50,7 +50,7 @@
         os: [ubuntu-20.04, windows-2019, macos-11]
 
     steps:
-      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+      - uses: actions/checkout@v4 # v3.5.3
         with:
           # The tag to build or the tag received by the tag event
           ref: ${{ github.event.inputs.version || github.ref }}
~~~
3 insertions (+), 3 deletions (-)

After

± .github/workflows/wheel-builder.yml
~~~
--- /tmp/original20230919-213-acjvhd	2023-09-19 17:35:11.844596815 +0000
+++ /tmp/updated20230919-213-juz0p3	2023-09-19 17:35:11.844596815 +0000
@@ -25,7 +25,7 @@
     name: Build sdist
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+      - uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9 # v4.5.4
         with:
           # The tag to build or the tag received by the tag event
           ref: ${{ github.event.inputs.version || github.ref }}
@@ -50,7 +50,7 @@
         os: [ubuntu-20.04, windows-2019, macos-11]
 
     steps:
-      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
+      - uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9 # v4.5.4
         with:
           # The tag to build or the tag received by the tag event
           ref: ${{ github.event.inputs.version || github.ref }}
~~~
3 insertions (+), 3 deletions (-)

@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner September 19, 2023 17:41
@github-actions github-actions bot added the L: github:actions GitHub Actions label Sep 19, 2023
Copy link
Member

@jurre jurre left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for fixing this! Should we add a test that covers the scenario?

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/respect-style-of-each-action branch from 7b7a421 to 4a450ca Compare September 20, 2023 11:40
@deivid-rodriguez
Copy link
Contributor Author

@jurre I considered that but since an existing test already caught the issue, I decided to change that test to check for the correct result and don't add any new tests. Do you think it's fine?

I pushed an extra tweak to reuse git commit checkers since I noticed dry-run.rb was showing a lot of duplicated requests with the previous implementation.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/respect-style-of-each-action branch from 4a450ca to 1265727 Compare September 27, 2023 04:01
@deivid-rodriguez deivid-rodriguez merged commit 041aba6 into main Sep 27, 2023
80 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/respect-style-of-each-action branch September 27, 2023 05:11
brettfo pushed a commit to brettfo/dependabot-core that referenced this pull request Oct 11, 2023
…espect-style-of-each-action

Respect style of each action when mixed styles are used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: github:actions GitHub Actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub Actions version pinning dropped
2 participants