Coder Social home page Coder Social logo

svanboxel / add-vscode-extension-action Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 314 KB

This code reads the list of repositories to add the file to, adds the recommended extensions to the .vscode/extensions.json file, creates a new branch, adds the specified file to the branch, and creates a new pull request from the branch to the default branch of the repository for each repository.

JavaScript 100.00%

add-vscode-extension-action's Introduction

Add File to Repositories Action

This GitHub Action creates a pull request adding recommended extensions to the .vscode/extensions.json file in each repository.

tldr;

This GitHub Actions reads the list of repositories to add the file to, adds the recommended extensions to the .vscode/extensions.json file, creates a new branch, adds the specified file to the branch, and creates a new pull request from the branch to the default branch of the repository for each repository.

Inputs

  • github-token: Required. The GitHub token to use for authentication. Should have access to repositories listed in the repositories input.
  • organization-name: Required. The name of the organization that owns the repositories to update.
  • repositories: A comma-separated list of repository names to update. If not provided, all repositories in the organization will be updated.
  • extensions: Required. A comma-separated list of recommended VS Code extensions to add to the extensions.json file.
  • only-if-file-exists: If set to true, the action will only update the extensions.json file if it already exists in the repository. Defaults to false.
  • base: The name of the branch to use as the base for the pull request. Defaults to main.
  • branch-name: The name of the branch to create for the pull request. Defaults to update-vscode-extensions.
  • pull-request-title: The title of the pull request. Defaults to Update VS Code extensions.
  • pull-request-body: The body of the pull request. Defaults to an empty string.
  • commit-message: The commit message to use for the changes. Defaults to Update extensions.json.
  • author-name: The name of the author to use for the commit. Defaults to the name of the user associated with the GitHub token.
  • author-email: The email address of the author to use for the commit. Defaults to the email address of the user associated with the GitHub token.

Outputs

None.

Example Usage

name: Update VS Code Extensions

on:
  push:
    branches:
      - main

jobs:
  update-extensions:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Update VS Code extensions
        uses: username/update-vscode-extensions@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          organization-name: my-org
          extensions: ms-vscode.cpptools, ms-python.python

add-vscode-extension-action's People

Contributors

svanboxel avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.