All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fall back to non-annotated tags for pull requests
@ 2023-11-14  4:28 Mario Limonciello
  2024-01-23 23:04 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2023-11-14  4:28 UTC (permalink / raw)
  To: tools; +Cc: Mario Limonciello, Mario Limonciello

Not everyone uses an annotated tag, so fallback to a direct ref
tag if annotated tags fail.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 b4/pr.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/b4/pr.py b/b4/pr.py
index 6c01e2b..e62690b 100644
--- a/b4/pr.py
+++ b/b4/pr.py
@@ -71,7 +71,11 @@ def git_get_commit_id_from_repo_ref(repo, ref):
             lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/tags/%s^{}' % ref])
 
     elif ref.find('tags/') == 0:
+        #try as an annotated tag first
         lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/%s^{}' % ref])
+        if not lines:
+            # try it as a non-annotated tag, then
+            lines = b4.git_get_command_lines(None, ['ls-remote', repo, 'refs/%s' % ref])
 
     else:
         # Grab it as a head and hope for the best
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fall back to non-annotated tags for pull requests
  2023-11-14  4:28 [PATCH] Fall back to non-annotated tags for pull requests Mario Limonciello
@ 2024-01-23 23:04 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2024-01-23 23:04 UTC (permalink / raw)
  To: tools, Mario Limonciello; +Cc: Mario Limonciello


On Mon, 13 Nov 2023 22:28:35 -0600, Mario Limonciello wrote:
> Not everyone uses an annotated tag, so fallback to a direct ref
> tag if annotated tags fail.
> 
> 

Applied, thanks!

[1/1] Fall back to non-annotated tags for pull requests
      commit: dc0c5559df0ba626dd42d4fe144419585ea609ba

Best regards,
-- 
Konstantin Ryabitsev <konstantin@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-23 23:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14  4:28 [PATCH] Fall back to non-annotated tags for pull requests Mario Limonciello
2024-01-23 23:04 ` Konstantin Ryabitsev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.