Zum Inhalt springen
NEUMarktplatz und trig8n Agent: Verkaufen Sie, was Sie bauen, und erhalten Sie Pläne und Änderungen, die getestet sind, bevor Sie sie sehen. Neuigkeiten ansehen

Bibliothek / Code, Git & Entwicklertools

Code, Git & Entwicklertools

n8n-Workflows aus gemergten GitHub-Pull-Requests wiederherstellen

Wenn in GitHub ein Pull Request gemergt wird, ruft es die Commit-Details ab und stellt die geänderten Workflows über die API in n8n wieder her.

Was sie bewirkt

## Setup 1. Connect GitHub: Use the GitHub Trigger node and configure GitHub API credentials. Note: I'd recommended to use *GitHub PAT (Personal Access Token) classic* with repo and admin:repo_hook permission scopes enabled. 2. Connect n8n API: Provide your n8n API credentials in the n8n nodes. - Check this doc 3. Set repository variables: Update github_owner and repo_name in the Define Local Variables node. 4. Enable webhook: Make sure your GitHub repository has a webhook for pull_request events pointing to this workflow.

Die Schritte

  1. Define Local Variables
  2. Github Trigger - When there is new pull request
  3. Check if trigger event is pull request merged
  4. Fetch merged commit details via GitHub API
  5. Get files changes details
  6. Filter modified workflows
  7. Filter created workflows
  8. Fetch workflow content from Git
  9. Fetch workflow content from Git1
  10. Decode workflow content to json
  11. Decode workflow content to json1
  12. Update workflow in n8n
  13. Create new workflow in n8n

Ähnliche Automatisierungen