unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: How to streamline my Magit workflow?
Date: Sat, 29 Oct 2022 20:15:51 +0300	[thread overview]
Message-ID: <878rkywny0.fsf@thaodan.de> (raw)
In-Reply-To: <87bkpvqdmh.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 29 Oct 2022 09:43:02 +0200")

Marcin Borkowski <mbork@mbork.pl> writes:

> I am using Magit with BitBucket (don't judge me - my company uses BB,
> I'd probably prefer something else).  When I push (with Magit, of
> course), BitBucket responds with some info on the command line (I
> suppose it uses Git hooks under the hood, but that is not important
> here).  What is important is that I can parse that output to get the URL
> I need to visit in my browser to open a pull request.

My company uses BB too, I usually just open the browser to create a PR.

> Now, I'd like to streamline my workflow.  Instead of pressing `$',
> finding that URL and copying it to my browser, I'd like to either have
> it done automatically after a push or triggered with a custom command.

I think the best that could be done is to extend magit-forge with BB
support, however there were some issues with that as BB has no support
to predict the PR refs. https://github.com/magit/forge/pull/198 

> 2. Is there some hook which runs after a (Magit) push is completed?

Yes BB runs a post-receive hook on their server to send you this
message.

Magit doesn't run any hook only git would do. But I think you mean
magit-hook, you could try C-h m RET and see if any of the hooks could
help you.

The best you can do is to parse the output of git push.

Br,

Björn Bidar



  parent reply	other threads:[~2022-10-29 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29  7:43 How to streamline my Magit workflow? Marcin Borkowski
2022-10-29 11:18 ` Lele Gaifax
2022-10-29 17:03 ` Kyle Meyer
2022-10-29 17:15 ` Björn Bidar [this message]
2022-10-30  5:28 ` Peter Hardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rkywny0.fsf@thaodan.de \
    --to=bjorn.bidar@thaodan.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).