Skip to content

What is the best way to disable the initial prompt in the Package Version PR ? #244

Closed as duplicate

Description

@maximveksler

I would like to edit / disable the prefix to the auto generated PR.

Specifically, the folllwing text

This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

My workflow is to take the PR body and update the slack release channel with the changes. The prompt is repetative, and get's in the way.

Is there an option to discard it? If not, I would hope this could be classified as a feature request.

Activity

  1. Andarist commented on Dec 14, 2022

    @Andarist
    Member

    The PR body includes a nice Releases header that could be used as a split point for that whole message. Can't you manipulate the body a little bit before sending it to Slack?

  2. maximveksler commented on Dec 15, 2022

    @maximveksler
    Author

    Hey @Andarist, yes cleary much can be done.

    However it's still in the PR (for the reader to parse), and is repetative for the tooling as it's being used internally by people who have seen this message before. It's also a large courpose of text.

    Adding some option to override it, or disable the prompt (or even offer a way to slide in a template for the message) could be very helpful IMHO.

  3. Andarist commented on Dec 15, 2022

    @Andarist
    Member

    However it's still in the PR (for the reader to parse)

    Well, sure - but I also feel that it's super easy to just "skip" this information visually.

    and is repetative for the tooling as it's being used internally by people who have seen this message before.

    I don't see this being a big problem really. And while all members of your team might have already seen this "introductory information" - it cannot be said about all of your future team members.

    It's also a large courpose of text.

    I feel like calling this 50~ words paragraph a long one is a stretch. On my screen, it renders as 2.5 lines in GitHub's PR view.

    Adding some option to override it, or disable the prompt (or even offer a way to slide in a template for the message) could be very helpful IMHO.

    Maybe we could introduce a template - but with some other use cases in mind. I'm not that convinced that your use case here is that important. This didn't come up as a problem for the past years and it's the first time I hear a complaint about this particular "introductory information".


    That being said - perhaps what you are interested in is closer to what has been asked here?

  4. maximveksler commented on Dec 15, 2022

    @maximveksler
    Author

    Hi @Andarist ok, I see your point however please consider DX we should be optimising for signal/noise.

    The intro sits well for new comes as a side note IMHO, I'd suggest this to be a "product requirments" issue more than a technical issue per-se.

    Thank you for linking to #239, I believe this will not work for me, because I'm using a workflow_run.

    In essense my action looks like this:

    name: WIP- Release
    
    on:
      workflow_run:
        workflows:
          - Tests
        types: [completed]
        branches: [master]
    
    jobs:
      release:
        runs-on: ubuntu-latest
        if: ${{ github.event.workflow_run.conclusion == 'success' && (startsWith(github.event.workflow_run.head_commit.message, 'Version Packages') || contains(github.event.workflow_run.head_commit.message, '#release')) }}
        steps:
          - uses: actions/checkout@v3
            with:
              fetch-depth: 0
    
          - name: changesets
            id: changed-files
            uses: tj-actions/changed-files@v34
            with:
              dir_names: true
              dir_names_max_depth: 2
              files: |
                apps/**
    
          - name: PR details
            uses: 8BitJonny/gh-get-current-pr@2.2.0
            id: PR
    
          - name: Slack Markdown Converter
            id: pr_body_slackify
            uses: LoveToKnow/slackify-markdown-action@v1.0.0
            with:
              text: ${{ steps.PR.outputs.pr_body }}
    
          - name: Post Releasing to Slack
            id: slack
            uses: slackapi/slack-github-action@v1.23.0
            with:
              # Slack channel id, channel name, or user id to post message.
              # See also: https://api.slack.com/methods/chat.postMessage#channels
              channel-id: "xxxxxx" # infrastructure
              # For posting a rich message using Block Kit
              payload: |
                {
                  "text": "Releasing...",
                  "blocks": [
                    {
                      "type": "section",
                      "text": {
                        "type": "mrkdwn",
                        "text": ${{ toJSON(steps.pr_body_slackify.outputs.text) }}
                      }
                    }
                  ]
                }
            env:
              SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
    
          - name: Build Docker Files
            run: |
              for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
                echo "turbo docker $file ..."
              done
  5. oscar-b commented on Apr 13, 2023

    @oscar-b

    @Andarist I would also like to customise this text, as it's confusing for us, we don't publish to npm at all since we use this for both Java (internal distribution) and React Native projects (Expo).

    you can merge this and publish to npm yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions