Comments (3)
I would also like to see more customizability out of this bot. I may be a niche case, but I am trying to build out a conventional commit ci workflow using changesets. For that, it would be useful if I could run a script to convert commit messages to changesets before the bot runs through its scripts.
from bot.
This is an interesting idea, but you'd still need the head of the PR, since that's the one that would contain any changesets to check for.
So it would be something like:
- on
pull_request_target
- checkout repo (which will be the base)
- checkout head in another directory
- run the "check Changesets" action, with a configuration pointing to the directory from head.
I'm not sure how much of this would need to be implemented in user land, vs. could be contained within the action itself.
You could also have a condition that would check if this was a fork or not. if it isn't a fork, you can skip step 3.
from bot.
I've also wanted this recently, just for filtering. DefinitelyTyped-tools uses changesets but hasn't enabled the bot because we don't want people to add changesets for the allowedPackageJsonDependencies.txt
file (as the tooling always pulls from the repo, not published packages).
This is an interesting idea, but you'd still need the head of the PR, since that's the one that would contain any changesets to check for.
You definitely do not want to be cloning any untrusted code in pull_request_target
workflows. A better idea is to use the GitHub APIs to pull information about the PR, which is presumably what the bot already does now given it's implemented as a GitHub App (and would not be cloning).
For example, https://github.com/microsoft/TypeScript/blob/main/.github/workflows/pr-modified-files.yml is a workflow which triages PRs and closes / replies to them if certain conditions are met, but done without cloning.
See also: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
from bot.
Related Issues (20)
- Do not comment on some PRs, based on private packages or changed path? HOT 2
- Remove ignored/private packages on "add a changeset if you're a maintainer" link
- Ignore certain branches
- Changeset bot is including changesets not in the PR branch
- Support custom commit message generators
- Change changeset path HOT 2
- Include changeset(s) verbatim in bot message?
- Wrong version bump HOT 1
- Reset changeset detection when PR base branch is changed
- Support subdirectories HOT 1
- Feature request: require config
- feat: CI check for validating `changedFilePatterns`
- Running changesets bot on all previously opened PRs
- [💡 Feature request]: Previewing the changesets in Pull Requesst comment
- Bot reporting "No Changeset found", but there is. How to debug? HOT 3
- Make 'Changeset detected' look more different from 'No Changeset found'
- Feature request: option to turn off Changeset detected message
- Error when validating changeset config with root level package HOT 1
- Different message for PRs that do a version bump
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bot.