Skip to content

The "Hack for LA's GitHub Actions" Wiki guide needs additional explanation #6537

@t-will-gillis

Description

@t-will-gillis

Overview

The "Hack for LA's GitHub Actions" Wiki guide explains to devs how to setup a local environment to test GitHub Actions, including how to create tokens. The guide directs devs to create tokens with greater scope access than the standard HACKFORLA_BOT_PA_TOKEN. We need to test GHAs using the actual token scopes, otherwise the GHA might fail in production without the cause being obvious.

Action Items

There is an existing issue in the queue for updating this Wiki page once the new Wiki is released. Therefore, to make sure that information is not lost, we want to make sure our new changes incorporate the previous changes so that when the time comes there is only one copy of the page to be edited (with all of the changes).

  • Refer to Issue 4790 and especially this comment

  • Copy the entirety of that comment to a new comment in this issue.

  • Make the changes shown here:

    • Tip 7, 5th dropdown, replace:
      <details>
      <summary>5. Now you can create a new personal access token</summary>
      
      ![image](https://user-images.githubusercontent.com/88953806/227072745-0ee6a304-0f87-443b-9bcb-19c906f43142.png)
      
      </details>
      
      
      Select the following scopes:
      
      * workflow
      * admin:org  
      * user  
      * project
      
      When the token is generated, copy it and place it somewhere safe so you don't lose it. The token will not be available again when you leave the page!!
      
      
      with:
      <details>
      <summary>5. Now you can create a new personal access token</summary>
      
      ![image](https://user-images.githubusercontent.com/88953806/227072745-0ee6a304-0f87-443b-9bcb-19c906f43142.png)
      
      </details>
      
      - For "Note", add short description of what you are using the token for- this can be anything such as "Testing GHAs"  
      - For "Expiration*", you can leave the default of 30 days (you should NOT select "No expiration") 
      - For "Select scopes", select the following scopes to match the token used by the GHA you are testing:  
        * to match the `HACKFORLA_BOT_PA_TOKEN` select:
          * public_repo (under 'repo')
          * admin:org_hook 
        * to match the `HACKFORLA_ADMIN_TOKEN` select:
          * public_repo (under 'repo')
          * admin:org_hook 
          * write:org (under 'admin:org')
      
      When the token is generated, be sure to copy it and place it somewhere safe so you don't lose it. The token will not be available again when you leave the page!!
      
  • Follow the instructions for including the edited content as explained in Editing a Wiki page.

  • Remove the reference to issue 4790 on the Edit a Wiki page, that is remove:

    | [DR: Add notes about naming of personal tokens to "Hack for LA's GitHub Actions" Wiki page](https://github.com/hackforla/website/issues/4790#issuecomment-1603951213) |  |  |
    
  • As a final step, search through the posted updates on the Edit a Wiki page and make sure that there are not any additional updates to be made to the same Wiki page. If not, you're done. If you do find another update to the same Wiki page, notify the Merge Team so that we can review.

Resources/Instructions

Metadata

Metadata

Assignees

Labels

Complexity: SmallTake this type of issues after the successful merge of your second good first issueFeature: Wikirole: back end/devOpsTasks for back-end developerssize: 0.25ptCan be done in 0.5 to 1.5 hours

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions