Pygithub: Can't publish new versions using manage.sh

Created on 15 Mar 2020  ·  12Comments  ·  Source: PyGithub/PyGithub

Due to branch protection being enabled for master, this happens when a new release is attempted to be made:

[master afb1259a] Publish version 1.47
 2 files changed, 30 insertions(+), 1 deletion(-)
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.35 KiB | 460.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "continuous-integration/travis-ci" is expected. At least 1 approving review is required by reviewers with write access.
To github.com:PyGithub/PyGithub.git
 * [new tag]           v1.47 -> v1.47
 ! [remote rejected]   master -> master (protected branch hook declined)
error: failed to push some refs to '[email protected]:PyGithub/PyGithub.git'

@sfdye What do you think we should do? 1.47 is up on PyPi, it looks like the tag is up on Github, we're just missing the commit with the release notes, but that means the tag will have to move as well.

All 12 comments

Will look into it


From: Steve Kowalik notifications@github.com
Sent: Sunday, March 15, 2020 10:07:47 AM
To: PyGithub/PyGithub PyGithub@noreply.github.com
Cc: Liuyang Wan tsfdye@gmail.com; Mention mention@noreply.github.com
Subject: [PyGithub/PyGithub] Can't publish new versions using manage.sh (#1436)

Due to branch protection being enabled for master, this happens when a new release is attempted to be made:

[master afb1259https://github.com/PyGithub/PyGithub/commit/afb1259a4e52d7bbee8415a523d78c3a428968a8] Publish version 1.47
2 files changed, 30 insertions(+), 1 deletion(-)
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.35 KiB | 460.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "continuous-integration/travis-ci" is expected. At least 1 approving review is required by reviewers with write access.
To github.com:PyGithub/PyGithub.git

  • [new tag] v1.47 -> v1.47
    ! [remote rejected] master -> master (protected branch hook declined)
    error: failed to push some refs to '[email protected]git@github.com:PyGithub/PyGithub.git'

@sfdyehttps://github.com/sfdye What do you think we should do? 1.47 is up on PyPi, it looks like the tag is up on Github, we're just missing the commit with the release notes, but that means the tag will have to move as well.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/PyGithub/PyGithub/issues/1436, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHYERREFNXBAFOJBA4HC4DRHQZ7HANCNFSM4LKGWVZQ.

remote: error: Required status check "continuous-integration/travis-ci" is expected. At least 1 approving review is required by reviewers with write access.

I've disabled required travis check. Can you create a patch version 1.47.1 and try to publish it again?

image

manage.sh breaks when there are no changes between the old tag and the new tag. :-(

🤦‍♂ Let's fix it
what's the error?

There's 2 intertwined things -- the CI needs to pass, and 1 approving review is required. Without both of those, you can't push non-tags.

Sprinkling set -x into manage.sh:

++ grep -v Merge
++ git log v1.47.. --oneline '--pretty=format:* %s (%h)'
+ gitlog=
zsh: exit 1     REMOTE=pygithub ./manage.sh publish

Perhaps we should also make publishing new releases go through the PR process 🤔

I'm missing what OpenStack did, where you created a signed tag, pushed that, and the merge machinery created the tarball, release notes and the pypi release. :-)

The only thing about the PR process is we can't squash and merge since that will change the sha of the HEAD commit

Pull requests are merged using the --no-ff option, except for pull requests with squashed or rebased commits, which are merged using the fast-forward option.

Dear GitHub, why you so hard to work with :-( A ff merge is exactly what we want! perhaps a rebased commit of only one commit without HEAD changing out from under it would work, but I'm not sure if I'm wrong.

Okay, I've temporarily disable branch protection on master, until we can figure out a way to strike the balance between auditing every change and being able to push tags for release.

I've pushed the Publish 1.47 commit, comment when you re-enable the branch protection just for my piece of mind.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xpdable picture xpdable  ·  5Comments

jacquev6 picture jacquev6  ·  3Comments

hren-ron picture hren-ron  ·  6Comments

nchammas picture nchammas  ·  3Comments

diegotejadav picture diegotejadav  ·  5Comments