Giter Site home page Giter Site logo

alien-build-plugin-download-github's Issues

Sometimes doesn't properly decode json

https://gist.github.com/plicease/7cf0d4e282efe80c740e16ef6d148ef1

# Failed test 'live tests'
# at t/alien_build_plugin_download_github.t line 91.
# Caught exception in subtest: Can't use string ("[
#   {
#     "url": "https://api.gi"...) as an ARRAY ref while "strict refs" in use at /tmp/loop_over_bdir-7556-ioxMTR/Alien-Build-Plugin-Download-GitHub-0.02-0/blib/lib/Alien/Build/Plugin/Download/GitHub.pm line 64.
t/alien_build_plugin_download_github.t .. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Send GitHub PAT when using AB 2.40+

Alien-Build as of 2.40 supports sending headers via HTTP, so we should now be able to send an personal authorization token as a header to avoid at least some of the usage limits that cause test failures. Doing so would be a more robust solution that #6 which passes as an argument, and may not be supported anymore anyway. I also noticed there is a bug in #6 where I used different names for the environment variable (doh!).

Question becomes where should we go looking for the token? GitHub Actions apparently stores a PAT in secrets.GITHUB_TOKEN so that seems to be at least one place. We should also check an environment variable dedicated to AB so that users can have a token for just that and isolate it from their "default" token. What about a file?

  • env var ALIEN_BUILD_GITHUB_TOKEN
  • env var GITHUB_TOKEN
  • env var GITHUB_PAT
  • documentation
  • use in CI

Sometimes returns 403 Forbidden from GH

https://gist.github.com/plicease/f5464741dc69edc9c67e29988e6cfd61

# Failed test 'live tests'
# at t/alien_build_plugin_download_github.t line 91.
# Caught exception in subtest: error fetching https://api.github.com/repos/Perl5-Alien/dontpanic/releases: 403 Forbidden at /tmp/loop_over_bdir-14705-f0UB_Z/Alien-Build-1.63-0/blib/lib/Alien/Build/Plugin/Fetch/HTTPTiny.pm line 75.
t/alien_build_plugin_download_github.t .. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Should be able to specify no extractor

For when the asset really is the thing that you need and it doesn't need to be further extracted! I think the GitLab version of this already has this.

(probably) bogus rather alarming warnings when using GitHub plugin correctly

use alienfile;

plugin 'PkgConfig' => ( pkg_name => 'libtcod', );

share {
    plugin 'Download::GitHub' => (
        github_user => 'libtcod',
        github_repo => 'libtcod',
    );
    plugin 'Extract::ArchiveTar';
    plugin 'Build::Autoconf';
};

as you can see it is not directly using the regular negotiator

git:(pu) 10:18 Alien-TCOD » carton exec af download
Alien::Build::Plugin::PkgConfig::Negotiate> Using PkgConfig plugin: PkgConfig::CommandLine
Alien::Build::Plugin::Download::Negotiate> !! WARNING !! WARNING !!
Alien::Build::Plugin::Download::Negotiate> !! WARNING !! It looks like this alien is using the regular download negotiator
Alien::Build::Plugin::Download::Negotiate> plugin on a GitHub release page.  This will typically not work due to changes
Alien::Build::Plugin::Download::Negotiate> in the way GitHub release page works now.  The Alien should instead be updated
Alien::Build::Plugin::Download::Negotiate> to use the Download::GitHub plugin, which uses the GitHub API to find available
Alien::Build::Plugin::Download::Negotiate> releases.  See: https://metacpan.org/pod/Alien::Build::Plugin::Download::GitHub
Alien::Build::Plugin::Download::Negotiate> !! WARNING !! WARNING !!
Can't locate Mojo/DOM58.pm in @INC (you may need to install the Mojo::DOM58 module) (@INC entries checked: /Users/perigrin/dev/Alien-TCOD/local/lib/perl5/darwin-2level /Users/perigrin/dev/Alien-TCOD/local/lib/perl5 /Users/perigrin/.plenv/versions/5.38.0/lib/perl5/site_perl/5.38.0/darwin-2level /Users/perigrin/.plenv/versions/5.38.0/lib/perl5/site_perl/5.38.0 /Users/perigrin/.plenv/versions/5.38.0/lib/perl5/5.38.0/darwin-2level /Users/perigrin/.plenv/versions/5.38.0/lib/perl5/5.38.0) at /Users/perigrin/dev/Alien-TCOD/local/lib/perl5/Alien/Build.pm line 337.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.