Comments (3)
Please let me know if you're still interested in this feature knowing this.
I am. I don't disagree that the PAT approach is likely better, but I'm using this action quite extensively across two orgs and many repos, so being able to turn on a prompt to close and reopen the PR is a more compelling short-term fix than going through and figuring out setting up a bot account, PAT, etc etc across both orgs. Especially considering the potential security implications.
from backport-action.
Hi @negz, that sounds like a good addition. I can imagine other use cases for this as well. But, allow me first to focus on your case.
One hacky but very lightweight workaround for this issue
In your case, it's probably better to look at the 2nd option from this workaround section:
Use a repo scoped Personal Access Token (PAT) created on an account that has write access to the repository that pull requests are being created in. This is the standard workaround and recommended by GitHub. However, the PAT cannot be scoped to a specific repository so the token becomes a very sensitive secret. If this is a concern, the PAT can instead be created for a dedicated machine account that has collaborator access to the repository. Also note that because the account that owns the PAT will be the creator of pull requests, that user account will be unable to perform actions such as request changes or approve the pull request.
If you change the github_token
input value to the PAT of a machine account that is contributor in your repo, the backport-action should simply interact with your repository from that machine account. This should then trigger your workflows normally.
Please let me know if you're still interested in this feature knowing this. If you happen to try the above solution, please also let me know if you run into any issues.
Having said that, I see 2 options to support more dynamic PR descriptions:
- allow configuring a template for the PR description
- this requires some input property, e.g.
pr_description_template
- this requires special keywords that when used in the template are replaced with:
- the original
pr_number
- the
target
branchname
- the original
- this requires some input property, e.g.
- allow configuring a footer/postfix for the PR description
- this requires some input property, e.g.
pr_description_footer
- just appends the value to the PR description
- this requires some input property, e.g.
Clearly the latter is easier to implement, but the prior seems more flexible and extendable in the future. My preference would go to the prior. I'm also open to other ideas.
from backport-action.
@negz I've created a pull request to add support for this, using the first option I described. Note that the naming has changed from that first proposal. For the full documentation, please have a look at the README.
You can use the version of this pull request by configuring the action in your workflow:
...
uses: zeebe-io/backport-action@custom-pull-descriptions
with:
version: custom-pull-descriptions
pull_description: |-
Your custom description here,
It can contain new lines and ${placeholders}
See the README linked above for more details
Please let me know whether this works correctly for you 🙂
from backport-action.
Related Issues (20)
- Automate release process
- Document action outputs
- [Feature Request] Support auto-deletion for branches if the backport PR is closed HOT 1
- Feature request: allow specifying mainline HOT 9
- PR commits are cherry-picked instead of the squashed commit HOT 8
- Feature request : backport to all open feature branches HOT 8
- Use PAT in eat-your-own-dogfood workflow
- Support glob patterns in `target_branches` input
- Improve error message on workflow file changes HOT 5
- Support skipping merge commits HOT 3
- PRs created by backport-action should trigger the CI HOT 1
- ability to backport a PR to any repo, not necessarily a fork HOT 3
- support backport, committing conflicts HOT 4
- Instructions for manually cherry-picking are incorrect as they do not skip merge commits HOT 2
- Get The successful PR numbers as an output of the action HOT 1
- Improve the error messages
- Conflict resolution `draft_commit_conflicts` provides incorrect instructions
- Conflict resolve suggestion doesn't fetch commits to cherry-pick HOT 5
- Delete the backport branch after merge HOT 2
- Workflow dispatch support
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 backport-action.