apache / pekko

Build highly concurrent, distributed, and resilient message-driven applications using Java/Scala
https://pekko.apache.org/
Apache License 2.0
1.17k stars 140 forks source link

Feature: Add pr link to git message automaticly by github #885

Closed laglangyue closed 8 months ago

laglangyue commented 8 months ago

like this sreenshot, which is from apache seatunnel image

this link is not added by developer, and it's automatic, maybe by github. this link can help us to trace history and reasons for changes and obtain more information

laglangyue commented 8 months ago

image

then add vcs.xml


<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
  <mapping directory="$PROJECT_DIR$" vcs="Git"/>
</component>
<component name="IssueNavigationConfiguration">
  <option name="links">
    <list>
      <IssueNavigationLink>
        <option name="issueRegexp" value="#(\d+)"/>
        <option name="linkRegexp" value="https://github.com/apache/seatunnel/pull/$1"/>
      </IssueNavigationLink>
    </list>
  </option>
</component>
</project>
He-Pin commented 8 months ago

@mdedetrich @pjfanning ping, I can't access the setting tab.

pjfanning commented 8 months ago

You get the PR link if you squash merge.

He-Pin commented 8 months ago

I see, so I just need do a squash merge !

mdedetrich commented 8 months ago

Do note that the PR link in the git message is largely irrelevant because the github ui allows you to search by the commit hash and when you do this it will also provide the PR behind that commit hash, even though I do admit that it is a nice touch.

Another thing to keep note of is that technically speaking according to ASF policy, github is a convenience and hence ASF projects shouldn't be tied to github. There is gitbox for that.

laglangyue commented 8 months ago

Do note that the PR link in the git message is largely irrelevant because the github ui allows you to search by the commit hash and when you do this it will also provide the PR behind that commit hash, even though I do admit that it is a nice touch.

Another thing to keep note of is that technically speaking according to ASF policy, github is a convenience and hence ASF projects shouldn't be tied to github. There is gitbox for that.

Infact, we won't actually add a link to the git message, we just added the PR ID. such as this, the idea vcs plugin will translator the PR ID to a link,This is a convenient operation to review history. image

as pjfanning said, use squash merge would get the pr-id

mdedetrich commented 8 months ago

I understand, my point is that even the PR link (i.e. the #285 which you highlighted in the screenshot) is just a minor convenience if you copy the git hash of the commit and paste it in the search bar of the github repo, github will bring you to the original PR.