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

Update multiple GHAs about PRs #5575

Merged

Conversation

t-will-gillis
Copy link
Member

@t-will-gillis t-will-gillis commented Sep 24, 2023

Fixes #5493
includes #5496
includes #5498
includes #5499

What changes did you make?

  • Updated actions/checkout@v3 --> actions/checkout@v4
    • pr-instructions.yml
    • set-pr-labels.yaml
    • wr-pr-instructions.yml
    • wr-set-pr-labels.yaml
  • Tested to confirm the GHA functions as expected with update
  • Testing was successful, see following, OK to update

Why did you make the changes (we will use this info to test)?

  • Change made to confirm the Dependabot recommended version updates for compatibility with existing automation

Links to tests

Test PR
pr-instructions.yml log
set-pr-labels.yaml log
wr-pr-instructions.yml log
wr-set-pr-labels.yaml log

Note to PR Reviewers

  • The process for testing GHAs is different from procedures described in the CONTRIBUTING.md document. You will want to have an environment set up in your local repo and test the GHAs on the desktop.

  • First, review the following wiki pages Hack for LA's GitHub Actions and follow the "Mini Guide".

    • Pay close attention especially to Steps 6 & 7.
    • Note in Step 6: When you create your Project Board, be sure to name it (or rename it if needed) "Project Board"
    • Note in Step 7: It is best practice to give your secret an expiration date.
    • Note in Step 7 also: when you are creating your own token, do not give your token the same name that you see in the yaml file. In other words, do not give your token the same name as HfLA's token, otherwise unexpected behavior may result. Any other name is OK (for example, TEST_TOKEN).
  • To continue creating your testing environment, go to your local repo on the desktop and create a new branch for testing:

    • From your "gh-pages" branch, make sure you are synced to HfLA.
    • Select the "gh-pages" button, enter a name for your test branch (such as "test-ghas-for-pr-review"), then select "Create branch". You will make edits and test from here.
    • Next, go to "Settings" on the upper right, scroll down to "Default branch", and select the button with the arrows to switch you default branch to another branch.
    • Find your newly created branch and select it, then "Update", then "I understand, update the default branch".
    • Important- when you are done testing you will want to repeat these steps to reselect "gh-pages" as your default branch.
    • Now, when you make edits to the "website" on your repo you will only affect the new branch.
  • For testing this specific action you will need to make changes to four yml/yaml files:

    • .github/workflows/pr-instructions.yml:
      • Line 8: add the name of the branch you are using to test, e.g. - 'my-test-branch'
      • Line 13: switch to - uses: actions/checkout@v4
    • .github/workflows/set-pr-labels.yaml:
      • Line 9: add the name of the branch you are using to test, e.g. - 'my-test-branch'
      • Line 19: switch to - uses: actions/checkout@v4
    • .github/workflows/wr-pr-instructions.yml:
      • Line 47: switch to - uses: actions/checkout@v4
    • .github/workflows/wr-set-pr-labels.yaml:
      • Line 27: switch to - uses: actions/checkout@v4
  • Additional steps needed to successfully test this action:

    • Create an issue:
      • Set up "Labels" if you have not done so already: select "Issues" from your repo, then "New Issue", then choose any issue with "Get Started" on the right, then on the right click on the gear next to "Labels". You will need to add all of the following labels if you have not already: "Complexity: Missing", "Feature Missing", "role missing", "size: missing", "role: front end","role: back end/devOps". From "Labels", click on "Edit labels" , then "New label", and add each label exactly as shown, without the quotes.
      • Now click "Issues" again, then "New issue", then select "Get started" on "Blank Issue Template".
      • On the right, select "Projects" and then your own Project Board- it might be listed under "Recent" or "Repository".
      • Add any title, then "Submit new issue". Take note of the issue # created.
    • Edit your website test branch:
      • Now click on "<> Code" on the upper left.
      • Select any file- it doesn't matter which. You can use CONTRIBUTING.md if you want.
      • Select the pencil icon on the upper right to edit. Make any edit to the file, then select "Commit changes..."
      • Important: select the radio button "Create a new branch for this commit and start a pull request", then "Propose changes"
      • On the next screen, "Create pull request".
      • Be sure to include your new issue number in "Fixes #---"
      • Make sure that under "Projects" your repo's Project Board is selected.
      • Select "Create pull request".
    • Verify GHAs:
      • If you set up everything correctly, then after a couple of minutes you will see:
        • github-actions bot will add the comment you have seen before "Want to review this pull request? . . . "
        • github-actions bot will transfer/add the labels from your issue to the PR
        • There will be four new logs under "Actions" for each of the GHAs- these should all be green.
        • If the above is true, then your test was successful.

Dependabot update `actions/checkout@v3` --> `@v4`
Dependabot update `actions/checkout@v3` --> `@v4`
Dependabot update `actions/checkout@v3` --> `@v4`
Dependabot update `actions/checkout@v3` --> `@v4`
@github-actions
Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b t-will-gillis-dependabot-update-5493 gh-pages
git pull https://github.com/t-will-gillis/website.git dependabot-update-5493

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Medium Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms size: 1pt Can be done in 4-6 hours Draft Issue is still in the process of being created labels Sep 24, 2023
@t-will-gillis t-will-gillis removed the Draft Issue is still in the process of being created label Sep 25, 2023
@blulady blulady requested review from mademarc and mshirk2 September 27, 2023 02:22
@mshirk2
Copy link
Member

mshirk2 commented Sep 27, 2023

ETA: Fri 9/29, 6pm
Availability: 9/28-9/29, 10-5pm PT

@mademarc
Copy link
Member

Review ETA: 9/28/2023
Availability: 7PM

Copy link
Member

@mademarc mademarc left a comment

Choose a reason for hiding this comment

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

Hey @t-will-gillis good job on the changes on lines 13, 19, 43 on the yml files on this issue.

Copy link
Member

@mshirk2 mshirk2 left a comment

Choose a reason for hiding this comment

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

Hi @t-will-gillis — the branching is set up correctly, the corresponding issue is linked, the PR is descriptive, and the change updating the dependabot version from 3 to 4 across 4 files has been done correctly. Well done!

@t-will-gillis t-will-gillis merged commit adcc77c into hackforla:gh-pages Sep 30, 2023
12 checks passed
@t-will-gillis t-will-gillis deleted the dependabot-update-5493 branch September 30, 2023 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms role: back end/devOps Tasks for back-end developers size: 1pt Can be done in 4-6 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confirm dependabot version update to pr-instructions.yml
3 participants