Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,41 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

name: Convert PRs to Draft on Opening

permissions:
contents: write
name: Pull Request preparation

on:
pull_request:
types: [opened]
Comment thread
BlackYps marked this conversation as resolved.

jobs:
convert_to_draft:
prepare_pr:
name: Prepare pull request
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- run: gh pr ready --undo ${{ github.event.pull_request.number }}
- name: Checkout PR branch
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
ssh-key: ${{ secrets.SSH_FAFOREVER_MACHINE_USER }}

- name: Add snippet
working-directory: changelog/snippets
run: |
# Configure git
git config user.email "github@faforever.com"
git config user.name "FAForever Machine User"

FILE=category.${{ github.event.pull_request.number }}.md
cp sections/template-snippet.md $FILE
sed -i "s/XYZW/${{ github.event.pull_request.number }}/g" $FILE

git add .
git commit -m "Add snippet template"
git push
Comment thread
BlackYps marked this conversation as resolved.

- name: Convert PR to draft
run: gh pr ready --undo ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
1 change: 1 addition & 0 deletions changelog/snippets/category.7125.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Your explanation here... [Don't forget to change the category in the filename] (#7125).
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
1 change: 1 addition & 0 deletions changelog/snippets/sections/template-snippet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Your explanation here... [Don't forget to change the category in the filename] (#XYZW).
Loading