Git Product home page Git Product logo

generate-pull-request-description's People

Contributors

cortadocodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generate-pull-request-description's Issues

error that dev version is not supported

Support request

About me

I love the idea to auto generate the PR based on commit messages, that's how I end up here.

Request

  • I've searched the list of existing issues
  • I expected the docs to cover it in [this section](please provide link to where you'd expect to find help on this in the docs) but they don't cover it.

I'm trying to use it for my own repo, but gives the following error:

Error: Unable to resolve action riskledger/update-pr-description@dev, unable to find version dev

I solved it by updating the text to:
riskledger/update-pr-description@v2

Does not Follow Conventional Commits Spec

It does not follow the latest v1.0.0 conventional commits types.

From the code, it supports the following types:

COMMIT_CODES_TO_HEADINGS_MAPPING = {
    "FEA": "### New features",
    "ENH": "### Enhancements",
    "FIX": "### Fixes",
    "OPS": "### Operations",
    "DEP": "### Dependencies",
    "REF": "### Refactoring",
    "TST": "### Testing",
    "MRG": OTHER_SECTION_HEADING,
    "REV": "### Reversions",
    "CHO": "### Chores",
    "STY": "### Style",
    "WIP": OTHER_SECTION_HEADING,
    "DOC": OTHER_SECTION_HEADING,
}

But the conventional commits specification have different types and lowercased.

Other than that, it works great! Thank you for your efforts!

TypeError: string indices must be integers

Bug report

About me

We are trying to use your GitHub action but it doesn't work exactly as needed at the minute - we could potentially submit PRs to fix this if you are open to that

What is the current behavior?

Action throws error:

Traceback (most recent call last):
  File "/usr/local/bin/generate-pull-request-description", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 459, in main
    ).generate()
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 116, in generate
    parsed_commits, unparsed_commits = self._parse_commit_messages_from_github()
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 249, in _parse_commit_messages_from_github
    header, *body = commit["commit"]["message"].split("\n")
TypeError: string indices must be integers

What is the expected behavior?

Not to throw the error

image

Use github actions outputs, not `env`

Feature request

Use Case

We want to be able to reuse the text output in subsequent jobs or reusable workflows

Current state

Current usage instructions look like this:

- uses: octue/[email protected]
  with:
    pull_request_url: ${{ github.event.pull_request.url }}
    api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Update pull request body
  uses: riskledger/update-pr-description@v2
  with:
    body: ${{ env.PULL_REQUEST_DESCRIPTION }}
    token: ${{ secrets.GITHUB_TOKEN }}

What's happening is that the action is putting outputs into the github actions environment, visible to all subsequent actions but not usable in subsequent jobs. This comes from before GitHub had a way of dealing with outputs.

GitHub actions now allows steps to run complex commands, including setting outputs which can then be reused in subsequent jobs (only the subsequent jobs where you want them) and reusable workflows like this.

Suggested action

Alter the outputs to be set via command rather than attached to env, update usage instructions accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.