Giter VIP home page Giter VIP logo

Comments (3)

christophebedard avatar christophebedard commented on July 19, 2024 1

This sounds like a great feature. I'm actually going to be needing this soon, so I'll probably try to implement this, unless you wanted to do it.

from action-ros-ci.

christophebedard avatar christophebedard commented on July 19, 2024 1

Indeed, that is the relevant part.

I haven't had time to implement this yet, so feel free to give it a shot.

from action-ros-ci.

moriarty avatar moriarty commented on July 19, 2024

Ran into this issue on a project which triggers CI daily on all the supported branches.
I'm not 💯 familiar with ts or actions but looks like something is needed here:

https://github.com/ros-tooling/action-ros-ci/blob/master/src/action-ros-ci.ts#L553-L574

        // The repo file for the repository needs to be generated on-the-fly to
        // incorporate the custom repository URL and branch name, when a PR is
        // being built.
        let repoFullName = process.env.GITHUB_REPOSITORY as string;
        if (github.context.payload.pull_request) {
                repoFullName = github.context.payload.pull_request.head.repo.full_name;
        }
        const headRef = process.env.GITHUB_HEAD_REF as string;
        const commitRef = headRef || github.context.sha;
        const repoFilePath = path.join(rosWorkspaceDir, "package.repo");
        // Add a random string prefix to avoid naming collisions when checking out the test repository
        const randomStringPrefix = Math.random().toString(36).substring(2, 15);
        const repoFileContent = `repositories:
  ${randomStringPrefix}/${repo["repo"]}:
    type: git
    url: 'https://github.com/${repoFullName}.git'
    version: '${commitRef}'`;
        fs.writeFileSync(repoFilePath, repoFileContent);
        await execShellCommand(
                ["vcs import --force --recursive src/ < package.repo"],
                options
        );

from action-ros-ci.

Related Issues (20)

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.