Giter Club home page Giter Club logo

Comments (1)

imjohnbo avatar imjohnbo commented on June 12, 2024 1

Would something like this work:

If owner OR comment = “/ok-to-test”
.> ..tests?

Good question @hamelsmu – yes! I was envisioning more slash commands like deploy being parsed in a separate workflow (now called ok-to-test.yml). It's a tradeoff of complexity, which is now hidden behind the helper action(s) in ok-to-test.yml.

peter-evans/slash-command-dispatch takes care of a few other things that I'd want to see in a test-centric solution, like reacting back on the comment, ensuring the permission level of the commenter, restricting the issue type, and grabbing the pull request number that the test workflow can use.

Maybe we should make this into a stop/go action that takes an issue_comment, decides if it's a valid comment from a permissioned author, and proceeds. 🤔This part to update the PR check could also be a separate action:

# Update check run called "integration-fork"
- uses: actions/github-script@v1
id: update-check-run
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pull } = await github.pulls.get({
...context.repo,
pull_number: process.env.number
});
const ref = pull.head.sha;
const { data: checks } = await github.checks.listForRef({
...context.repo,
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
const { data: result } = await github.checks.update({
...context.repo,
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion
});
return result;
.

from ok-to-test.

Related Issues (12)

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.