programing

커밋 메시지 내 GitHub의 이슈 번호 링크

lastcode 2023. 4. 17. 21:54
반응형

커밋 메시지 내 GitHub의 이슈 번호 링크

GitHub의 발행번호에 대한 링크를 자동으로 가질 수 있습니까?git commit메시지?

포함시키기만 하면 됩니다.#xxx문제를 닫지 않고 참조할 수 있습니다.

새로운 GitHub 문제 2.0에서는 다음 동의어를 사용하여 문제를 참조하고 닫을 수 있습니다(커밋 메시지로).

  • fix #xxx
  • fixes #xxx
  • fixed #xxx
  • close #xxx
  • closes #xxx
  • closed #xxx
  • resolve #xxx
  • resolves #xxx
  • resolved #xxx

대체를 할 수도 있습니다.#xxx와 함께gh-xxx.

저장소 전체에서 문제를 참조하고 닫는 것도 가능합니다.

fixes user/repo#xxx

도움말 섹션에서 사용 가능한 설명서를 확인하십시오.

GitHub 문제에 링크하여 문제를 종료하려면 Git 커밋 메시지에 다음 행을 입력합니다.

Closes #1.
Closes GH-1.
Closes gh-1.

(3가지 중 어느 것이든 상관없습니다.)그러면 문제가 링크되고 닫힙니다.상세한 것에 대하여는, 이 블로그의 투고를 참조해 주세요(매립형 비디오의 시청은 1시 40분경 개시).

유사한 구문이 닫히지 않고 단순히 문제에 링크될지는 잘 모르겠습니다.

github은 커밋에 #commitenbr이 포함되어 있는 경우 참조를 추가합니다(우연히 검출).

또한 상호 참조 저장소를 사용할 수 있습니다.

githubuser/repository#xxx

xxx가 발행번호입니다.

그들은 블로그 https://github.https/2011-04-09-https-2-0-the next-generation/에 새로운 이슈 2.0에 대한 멋진 글을 올렸습니다.

동의어는 다음을 포함한다.

  • 수정 #xxx
  • 고정 #xxx
  • 수정 #xxx
  • #xxx를 닫습니다.
  • #xxx를 닫습니다.
  • 닫힘 #xxx

커밋 메시지 중 하나의 키워드를 사용하면 커밋이 언급되거나 종료됩니다.

발행번호를 커밋메시지에 링크하려면 다음 사항을 추가해야 합니다.#issue_numbergit commit 메시지에서 확인하세요.

에서의 커밋메시지 예시 Udacity Git 커밋 메시지 스타일 가이드

feat: Summarize changes in around 50 characters or less

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequenses of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Resolves: #123
See also: #456, #789

다음과 같이 저장소를 참조할 수도 있습니다.

githubuser/repository#issue_number

다른 답변과 마찬가지로:발행번호로 커밋메시지를 쓰고 싶지 않은 경우 이클립스를 개발용으로 사용하고 싶다면 eGit 및 Mylyn 플러그인과 Mylyn용 GitHub 커넥터를 설치할 수 있습니다.그러면 Eclipse는 작업 중인 문제를 자동으로 추적하고 다른 모든 답변에 표시된 문제 번호를 포함하여 자동으로 커밋 메시지를 채울 수 있습니다.

그 설정의 상세한 것에 대하여는, http://wiki.eclipse.org/EGit/GitHub/UserGuide 를 참조해 주세요.

프로그래머로서의 첫 번째 프로젝트 중 하나는 스테이지코치라고 불리는 보석으로, 브랜치상의 모든 커밋 메시지에 GITHUB 발행 번호를 자동으로 추가할 수 있게 되어 있었습니다.이것은 아직 답변되지 않은 질문의 일부입니다.

으로 브랜치를 작성할 : 커스텀명령어)를 합니다.stagecoach -b <branch_name> -g <issue_number>발행번호는 yml 파일로 해당 브랜치에 할당됩니다.그 후 문제 번호를 자동으로 커밋메시지에 부가하는 커밋 후크가 있었습니다.

프로그래밍을 시작한 지 몇 달밖에 되지 않아 더 이상 유지보수를 하지 않기 때문에 프로덕션 용도로는 추천하지 않지만, 누군가 관심을 가질 수도 있습니다.

언급URL : https://stackoverflow.com/questions/1687262/link-to-the-issue-number-on-github-within-a-commit-message

반응형