|
491 | 491 | <Strong>(required Number)</Strong> The ID of a project</li>
|
492 | 492 | <li><code>msg.payload.file_path</code> :
|
493 | 493 | <Strong>(required String)</Strong> Full path to file. </li>
|
494 |
| - <li><code>msg.payload.ref</code> : |
495 |
| - <Strong>(required String)</Strong> The name of branch, tag or commit</li> |
| 494 | + <li><code>msg.payload.ref</code> : |
| 495 | + <Strong>(required String)</Strong> The name of branch, tag or commit</li> |
496 | 496 | </ul>
|
497 | 497 | </p>
|
498 | 498 | </script>
|
|
524 | 524 | }
|
525 | 525 | });
|
526 | 526 | </script>
|
| 527 | + |
| 528 | + |
| 529 | + |
| 530 | +<!-- |
| 531 | + GitLab Create RepositoryFile |
| 532 | +--> |
| 533 | +<script type="text/x-red" data-template-name="GitLab-Create-RepositoryFile"> |
| 534 | + <div class="form-row"> |
| 535 | + <label for="node-input-gitlabconfig"><i class="fa fa-globe"></i> API Key</label> |
| 536 | + <input type="text" id="node-input-gitlabconfig"> |
| 537 | + </div> |
| 538 | + <div class="form-row"> |
| 539 | + <label for="node-input-branch_name"><i class="fa fa-tag"></i> Branch</label> |
| 540 | + <input type="text" id="node-input-branch_name" placeholder="The name of branch,"> |
| 541 | + </div> |
| 542 | + <div class="form-row"> |
| 543 | + <label for="node-input-encoding"><i class="fa fa-tag"></i> Encoding</label> |
| 544 | + <select type="text" id="node-input-encoding"> |
| 545 | + <option value="text">text</option> |
| 546 | + <option value="base64">base64</option> |
| 547 | + </select> |
| 548 | + </div> |
| 549 | + <div class="form-row"> |
| 550 | + <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
| 551 | + <input type="text" id="node-input-name" placeholder="Name"> |
| 552 | + </div> |
| 553 | +</script> |
| 554 | + |
| 555 | +<script type="text/x-red" data-help-name="GitLab-Create-RepositoryFile"> |
| 556 | + <p>Create new file in repository</p> |
| 557 | + <p> |
| 558 | + Set the following in the node setting or in the input payload.: |
| 559 | + <ul> |
| 560 | + <li><code>msg.payload.project_id</code> : |
| 561 | + <Strong>(required Number)</Strong> The ID of a project</li> |
| 562 | + <li><code>msg.payload.file_path</code> : |
| 563 | + <Strong>(required String)</Strong> Full path to file. </li> |
| 564 | + <li><code>msg.payload.branch_name</code> : |
| 565 | + <Strong>(required String)</Strong> The name of branch</li> |
| 566 | + <li><code>msg.payload.encoding</code> : (String) Select encoding to 'text' or 'base64'. 'text' is default.</li> |
| 567 | + <li><code>msg.payload.content</code> : |
| 568 | + <Strong>(required String)</Strong> File content</li> |
| 569 | + <li><code>msg.payload.commit_message</code> : |
| 570 | + <Strong>(required String)</Strong> Commit message</li> |
| 571 | + </ul> |
| 572 | + </p> |
| 573 | +</script> |
| 574 | + |
| 575 | +<script type="text/javascript"> |
| 576 | + RED.nodes.registerType('GitLab-Create-RepositoryFile', { |
| 577 | + category: 'GitLab', |
| 578 | + defaults: { |
| 579 | + name: { |
| 580 | + value: "" |
| 581 | + }, |
| 582 | + branch_name: { |
| 583 | + value: "" |
| 584 | + }, |
| 585 | + encoding: { |
| 586 | + value: "text" |
| 587 | + }, |
| 588 | + gitlabconfig: { |
| 589 | + type: "gitlab-config", |
| 590 | + required: true |
| 591 | + } |
| 592 | + }, |
| 593 | + color: "#a493d4", |
| 594 | + inputs: 1, |
| 595 | + outputs: 1, |
| 596 | + icon: "gitlab_logo.svg", |
| 597 | + label: function() { |
| 598 | + return this.name || "GitLab Create RepositoryFile"; |
| 599 | + }, |
| 600 | + labelStyle: function() { |
| 601 | + return this.name ? "node_label_italic" : ""; |
| 602 | + } |
| 603 | + }); |
| 604 | +</script> |
| 605 | + |
| 606 | + |
| 607 | + |
| 608 | +<!-- |
| 609 | + GitLab Update RepositoryFile |
| 610 | +--> |
| 611 | +<script type="text/x-red" data-template-name="GitLab-Update-RepositoryFile"> |
| 612 | + <div class="form-row"> |
| 613 | + <label for="node-input-gitlabconfig"><i class="fa fa-globe"></i> API Key</label> |
| 614 | + <input type="text" id="node-input-gitlabconfig"> |
| 615 | + </div> |
| 616 | + <div class="form-row"> |
| 617 | + <label for="node-input-branch_name"><i class="fa fa-tag"></i> Branch</label> |
| 618 | + <input type="text" id="node-input-branch_name" placeholder="The name of branch,"> |
| 619 | + </div> |
| 620 | + <div class="form-row"> |
| 621 | + <label for="node-input-encoding"><i class="fa fa-tag"></i> Encoding</label> |
| 622 | + <select type="text" id="node-input-encoding"> |
| 623 | + <option value="text">text</option> |
| 624 | + <option value="base64">base64</option> |
| 625 | + </select> |
| 626 | + </div> |
| 627 | + <div class="form-row"> |
| 628 | + <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
| 629 | + <input type="text" id="node-input-name" placeholder="Name"> |
| 630 | + </div> |
| 631 | +</script> |
| 632 | + |
| 633 | +<script type="text/x-red" data-help-name="GitLab-Update-RepositoryFile"> |
| 634 | + <p>Update existing file in repository</p> |
| 635 | + <p> |
| 636 | + Set the following in the node setting or in the input payload.: |
| 637 | + <ul> |
| 638 | + <li><code>msg.payload.project_id</code> : |
| 639 | + <Strong>(required Number)</Strong> The ID of a project</li> |
| 640 | + <li><code>msg.payload.file_path</code> : |
| 641 | + <Strong>(required String)</Strong> Full path to file. </li> |
| 642 | + <li><code>msg.payload.branch_name</code> : |
| 643 | + <Strong>(required String)</Strong> The name of branch</li> |
| 644 | + <li><code>msg.payload.encoding</code> : (String) Select encoding to 'text' or 'base64'. 'text' is default.</li> |
| 645 | + <li><code>msg.payload.content</code> : |
| 646 | + <Strong>(required String)</Strong> File content</li> |
| 647 | + <li><code>msg.payload.commit_message</code> : |
| 648 | + <Strong>(required String)</Strong> Commit message</li> |
| 649 | + </ul> |
| 650 | + </p> |
| 651 | +</script> |
| 652 | + |
| 653 | +<script type="text/javascript"> |
| 654 | + RED.nodes.registerType('GitLab-Update-RepositoryFile', { |
| 655 | + category: 'GitLab', |
| 656 | + defaults: { |
| 657 | + name: { |
| 658 | + value: "" |
| 659 | + }, |
| 660 | + branch_name: { |
| 661 | + value: "" |
| 662 | + }, |
| 663 | + encoding: { |
| 664 | + value: "text" |
| 665 | + }, |
| 666 | + gitlabconfig: { |
| 667 | + type: "gitlab-config", |
| 668 | + required: true |
| 669 | + } |
| 670 | + }, |
| 671 | + color: "#a493d4", |
| 672 | + inputs: 1, |
| 673 | + outputs: 1, |
| 674 | + icon: "gitlab_logo.svg", |
| 675 | + label: function() { |
| 676 | + return this.name || "GitLab Update RepositoryFile"; |
| 677 | + }, |
| 678 | + labelStyle: function() { |
| 679 | + return this.name ? "node_label_italic" : ""; |
| 680 | + } |
| 681 | + }); |
| 682 | +</script> |
| 683 | + |
| 684 | + |
| 685 | + |
| 686 | +<!-- |
| 687 | + GitLab Remove RepositoryFile |
| 688 | +--> |
| 689 | +<script type="text/x-red" data-template-name="GitLab-Remove-RepositoryFile"> |
| 690 | + <div class="form-row"> |
| 691 | + <label for="node-input-gitlabconfig"><i class="fa fa-globe"></i> API Key</label> |
| 692 | + <input type="text" id="node-input-gitlabconfig"> |
| 693 | + </div> |
| 694 | + <div class="form-row"> |
| 695 | + <label for="node-input-branch_name"><i class="fa fa-tag"></i> Branch</label> |
| 696 | + <input type="text" id="node-input-branch_name" placeholder="The name of branch,"> |
| 697 | + </div> |
| 698 | + <div class="form-row"> |
| 699 | + <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
| 700 | + <input type="text" id="node-input-name" placeholder="Name"> |
| 701 | + </div> |
| 702 | +</script> |
| 703 | + |
| 704 | +<script type="text/x-red" data-help-name="GitLab-Remove-RepositoryFile"> |
| 705 | + <p>Delete existing file in repository</p> |
| 706 | + <p> |
| 707 | + Set the following in the node setting or in the input payload.: |
| 708 | + <ul> |
| 709 | + <li><code>msg.payload.project_id</code> : |
| 710 | + <Strong>(required Number)</Strong> The ID of a project</li> |
| 711 | + <li><code>msg.payload.file_path</code> : |
| 712 | + <Strong>(required String)</Strong> Full path to file. </li> |
| 713 | + <li><code>msg.payload.branch_name</code> : |
| 714 | + <Strong>(required String)</Strong> The name of branch</li> |
| 715 | + <li><code>msg.payload.commit_message</code> : |
| 716 | + <Strong>(required String)</Strong> Commit message</li> |
| 717 | + </ul> |
| 718 | + </p> |
| 719 | +</script> |
| 720 | + |
| 721 | +<script type="text/javascript"> |
| 722 | + RED.nodes.registerType('GitLab-Remove-RepositoryFile', { |
| 723 | + category: 'GitLab', |
| 724 | + defaults: { |
| 725 | + name: { |
| 726 | + value: "" |
| 727 | + }, |
| 728 | + branch_name: { |
| 729 | + value: "" |
| 730 | + }, |
| 731 | + gitlabconfig: { |
| 732 | + type: "gitlab-config", |
| 733 | + required: true |
| 734 | + } |
| 735 | + }, |
| 736 | + color: "#a493d4", |
| 737 | + inputs: 1, |
| 738 | + outputs: 1, |
| 739 | + icon: "gitlab_logo.svg", |
| 740 | + label: function() { |
| 741 | + return this.name || "GitLab Remove RepositoryFile"; |
| 742 | + }, |
| 743 | + labelStyle: function() { |
| 744 | + return this.name ? "node_label_italic" : ""; |
| 745 | + } |
| 746 | + }); |
| 747 | +</script> |
0 commit comments