Skip to main content

## commit_toolstate_change

# Function commit_toolstate_change

Source

    fn commit_toolstate_change(
        builder: &Builder<'_>,
        current_toolstate: &HashMap<Box<str>, ToolState>,
    )

Expand description

This function `commit_toolstate_change` provides functionality for pushing a change to the `rust-toolstate` repository.

The function relies on a GitHub bot user, which should have a Personal access token defined in the environment variable $TOOLSTATE_REPO_ACCESS_TOKEN. If for some reason you need to change the token, please update the Azure Pipelines variable group.

1. Generate a new Personal access token:

   - Login to the bot account, and go to Settings -> Developer settings -> Personal access tokens
   - Click “Generate new token”
   - Enable the “public_repo” permission, then click “Generate token”
   - Copy the generated token (should be a 40-digit hexadecimal number). Save it somewhere secure, as the token would be gone once you leave the page.

2. Update the variable group in Azure Pipelines

   - Ping a member of the infrastructure team to do this.

3. Replace the email address below if the bot account identity is changed

   - See https://help.github.com/articles/about-commit-email-addresses/ if a private email by GitHub is wanted.