Skip to content

Commit

Permalink
Update workflow to open issue on submit to master
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 committed Dec 16, 2024
1 parent 7b11aee commit 0cc8acb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ indent_size = 2
[*.java]
indent_size = 2

[*.yaml]
[{*.yaml,*.yml}]
indent_size = 2

[*.kt]
Expand Down
54 changes: 26 additions & 28 deletions .github/workflows/todo-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,31 @@

name: "Run TODO to Issue"
on:
pull_request:
branches: [ "master" ]
# push:
# branches:
# - main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "TODO to Issue"
uses: alstr/[email protected]
with:
AUTO_ASSIGN: "true"
INSERT_ISSUE_URLS: "true"
CLOSE_ISSUES: "true"
- name: Set Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and Push Changes
run: |
git add -A
if [[ `git status --porcelain` ]]; then
git commit -m "Automatically added GitHub issue links to TODOs"
git push origin main
else
echo "No changes to commit"
fi
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "TODO to Issue"
uses: alstr/[email protected]
with:
AUTO_ASSIGN: "true"
INSERT_ISSUE_URLS: "true"
CLOSE_ISSUES: "true"
- name: Set Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and Push Changes
run: |
git add -A
if [[ `git status --porcelain` ]]; then
git commit -m "Automatically added GitHub issue links to TODOs"
git push origin main
else
echo "No changes to commit"
fi

0 comments on commit 0cc8acb

Please sign in to comment.