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

Use version from PR title when edited by end user #26

Commits on Sep 6, 2023

  1. feat: use version from PR title when labelled as 'autorelease: user e…

    …dited'
    
    That makes it possible for an end user to control the version number number
    without having to rely on a commit with the footnote RELEASE-AS.
    
    The label can be easily added by a GitHub Action like this one:
    
    ```yaml
    name: Handle release PR edits
    on:
      pull_request:
        types:
          - edited
    
    jobs:
      update_pr_content:
        name: Update pull request content
        if: |
          github.event.pull_request.state == 'open' &&
          github.event.changes.title.from != github.event.pull_request.title &&
          github.event.sender.login != 'stainless-bot' # this is important to avoid infinite loops
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
    
          - uses: actions/github-script@v6
            with:
              script: |
                github.rest.issues.addLabels({
                  issue_number: context.issue.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  labels: ['autorelease: user edited'] # add the label
                })
    
          - name: Then here run release-please
          - run: ...
    ```
    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    6e5cc9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3de1ea8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    61a4552 View commit details
    Browse the repository at this point in the history
  4. fix: compile errors

    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    32ef574 View commit details
    Browse the repository at this point in the history
  5. tests: fix compile errors

    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    ab0b751 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    60b9596 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7259a3c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7394db3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    773b4f0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    53aba16 View commit details
    Browse the repository at this point in the history
  11. Update snapshots

    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    753c465 View commit details
    Browse the repository at this point in the history
  12. Improve warning message

    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    71abec0 View commit details
    Browse the repository at this point in the history
  13. Fix test snapshots

    dgellow committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    6d150d2 View commit details
    Browse the repository at this point in the history