# How to update PR to METADATA.jl?

**URL:** <https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [January 17, 2017, 8:33pm UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550 "2017-01-17T20:33:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [January 17, 2017, 8:33pm UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/1 "2017-01-17T20:33:15Z")

</div>

Scenario:

1. Tag a new version of a package and run `PkgDev.publish()` to create a PR to METADATA.jl.
2. Collect comments and do changes to your package.
3. Add a new commit to your package.
4. Update PR.

Steps 1 to 3 are clear, but what is the supposed way to perform step 4? So far the best approach I came with is to:

1. Run `PkgDev.tag("MyPackage", v"<same-version>"; force=true)` to replace the tag locally.
2. Run `git push -f origin v<same-version>` to push updated tag to GitHub.
3. Run `PkgDev.publish()` to create a new PR with renewed tag.

But I suspect posting a new PR each time I have changes is time-consuming for maintainers.

An alternative way is to:

1. Go to PR’s page on GitHub.
2. Manually modify `sha1` file to include new git hash.

But this creates a new commit each time an edit is done.

So what is the intended way to update an existing PR?

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [January 17, 2017, 9:56pm UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/2 "2017-01-17T21:56:30Z")

</div>

I used the Attobot:  
[https://github.com/attobot/attobot/blob/master/README.md](https://github.com/attobot/attobot/blob/master/README.md)

I really felt it was easy to use.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 18, 2017, 5:28am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/3 "2017-01-18T05:28:16Z")

</div>

If you look at the PR, it will tell you which branch of your METADATA fork the PR is for. Check out that branch and make the edits.

---

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [January 18, 2017, 9:03am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/4 "2017-01-18T09:03:43Z")

</div>

Looks promising! I’ll definitely give it a try for my next package!

---

<div class="post-metadata">

**Author:** ![dfdx](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dfdx/32/120_2.png) [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Post date:** [January 18, 2017, 9:16am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/5 "2017-01-18T09:16:03Z")

</div>

Maybe you have an example of how to checkout & push back the branch of that PR? In particular, I’m having a hard time fixing [this PR](https://github.com/JuliaLang/METADATA.jl/pull/7581) and here’s what I have tried so far (from METADATA.jl directory):

```
git fetch origin  
git fetch dfdx

git checkout pull-request/2daecf74
# error: pathspec 'pull-request/2daecf74' did not match any file(s) known to git.

git checkout dfdx/pull-request/2daecf74
# error: pathspec 'dfdx/pull-request/2daecf74' did not match any file(s) known to git.

git checkout remotes/dfdx/pull-request/2daecf74
# error: pathspec 'remotes/dfdx/pull-request/2daecf74' did not match any file(s) known to git.

git checkout origin/pull-request/2daecf74
# HEAD is now at 6ba76c45c... Update sha1
<do edits>
git push origin/pull-request/2daecf74
# fatal: You are not currently on a branch.
# To push the history leading to the current (detached HEAD)
# state now, use

     git push origin/pull-request/2daecf74 HEAD:<name-of-remote-branch>

```

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 18, 2017, 1:25pm UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/6 "2017-01-18T13:25:22Z")

</div>

This is why I use GitKraken. You set it up with your remotes and it will be visually way to find the branch.

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [September 20, 2018, 2:18am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/7 "2018-09-20T02:18:53Z")

</div>

Updated instructions for Julia 1.0/Pkg3 if you used Attobot (the Pkg3 bot to assist with PRs):

> **[GitHub - attobot/attobot: Julia package release bot](https://github.com/attobot/attobot#updatingdeleting-a-release)**
>
> Julia package release bot. Contribute to attobot/attobot development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [September 20, 2018, 12:04pm UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/8 "2018-09-20T12:04:30Z")

</div>

Hi Alec, thanks for sending this out. Can we now merge Pkg3 ready packages (e.g. through Attobot)? Until a few weeks ago the JuliaCIBot would fail and it was suggested not to include Project.toml files.

---

<div class="post-metadata">

**Author:** ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)\
**Post date:** [September 22, 2018, 3:06am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/9 "2018-09-22T03:06:01Z")

</div>

I’m definitely not well versed on the whole process - I had tried to submit a PR for a new package and got pointed in a different direction than what the earlier history of this thread suggested. I wanted to share an updated tip.

That all being said, I think it;s fine to merge Pkg3 ready packages. One of the maintainers suggested I remove the Project.toml file as it was making CI fail as well, though.

---

<div class="post-metadata">

**Author:** ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)\
**Post date:** [September 22, 2018, 10:15am UTC](https://discourse.julialang.org/t/how-to-update-pr-to-metadata-jl/1550/10 "2018-09-22T10:15:29Z")

</div>

Thanks, i’ll ask a broader question on Discourse in a few days.
