You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@kelly-sovacool
ok i tried something and i don't know how to see if this even makes sense but i used chatGTP to try and create the YAML for this type of action. It definitely needs editing to do the specific action we want but it may be a start
name: Update Issue TargetDate on Comment
Prompt: create YAML for Github action that will update issue TargetDate when specific comment is added to issue
Result:
on:
issue_comment:
types: [created]
jobs:
update-target-date:
runs-on: ubuntu-latest
steps:
- name: Check comment for target date update
id: check_comment
run: |
COMMENT_BODY="${{ github.event.comment.body }}"
TARGET_DATE_REGEX="Update TargetDate to (\d{4}-\d{2}-\d{2})"
if [[ $COMMENT_BODY =~ $TARGET_DATE_REGEX ]]; then
TARGET_DATE="${BASH_REMATCH[1]}"
echo "TARGET_DATE=$TARGET_DATE" >> $GITHUB_ENV
else
echo "No target date update found in comment."
exit 0
fi
- name: Update issue with target date
if: env.TARGET_DATE
uses: actions/github-script@v6
with:
script: |
const issueNumber = context.issue.number;
const targetDate = process.env.TARGET_DATE;
await github.issues.update({
...context.repo,
issue_number: issueNumber,
labels: ['TargetDate'],
body: `The TargetDate has been updated to ${targetDate}.`
});
await github.issues.createComment({
...context.repo,
issue_number: issueNumber,
body: `The issue TargetDate has been successfully updated to ${targetDate}.`
});
Description of feature
This would allow Trello x Unito to adjust the TargetDate field so the GitHub Project gantt chart matches Trello.
Trello allows issues (cards) to depend on each other, while GitHub Projects lack this feature.
@phoman14
The text was updated successfully, but these errors were encountered: