Skip to content

Latest commit

 

History

History

github-labels

Updating Github Repo Labels

NOTE: The .phet/.credentials file is no longer required.

This file is not used anywhere else in the project and should be removed. We are now storing credentials in build-local.json. See Getting Started for details.

Getting Started

  1. Setup credentials
  1. Install npm packages
  • The node scripts in this repo require running npm install in the phet-info/github-labels directory.
  1. Github label code requires a checkout of perennial/.

PhET Github Label operations

To standardize the labels on a new repo

  1. cd phet-info/github-labels
  2. Run ./new-repo-add-labels.sh phetsims/{{new-repo-name}}

To add a new label to all the organization's repos

  1. Choose a new label following the labeling-scheme
  2. cd phet-info/github-labels
  3. Run ./new-label-all-repos.sh {{new-label-name}} {{new-label-color}}. new-label-color should be the hexcode with no # symbol, e.g. FF00AA.

To change the text and/or color of a label

  1. Update the desired label in github-labels, following the labeling-scheme
  2. cd phet-info/github-labels
  3. Run ./change-label.sh {{old-label-name}} {{new-label-name}} {{new-label-color}}. new-label-color should be the hexcode with no # symbol, e.g. FF00AA.

To remove a label from all repos

  1. cd phet-info/github-labels
  2. Run ./delete-label.sh {{label-name}}.

To remove a repo from github label management

  1. If you have the file .repos (because you have used this tool before), delete the repo line from that file

FAQ

  • Error statuses during label script execution

    • 200, 201, etc - Anything in the 200 range indicates success.
    • 400 Bad Request - This probably indicates a fatal error. Verify if the change did not happen as expected and contact the responsible dev if not (Matt Pennington as of 2020).
    • 401 Unauthorized - This indicates that your credentials are incorrect. Make sure your username and personal access token are entered in ~/.phet/build-local.json correctly and check the status of your PAT at https://github.com/settings/tokens.
    • 403 Forbidden - This indicates that the Github User that you used does not have admin access for that repo. Make sure your username and personal access token are entered in ~/.phet/build-local.json correctly and contact any PhET Github Admin for further assistance.
    • 422 Unprocessable Entity - This is probably not an error and most likely indicates that the script attempted a duplicate action. Verify if the change did not happen as expected and contact the responsible dev if not (Matt Pennington as of 2020).