Git Product home page Git Product logo
  • bluetel / json-to-md

    peter-evans, GitHub Action to convert JSON object to markdown. Specifically for use with Symfony Security Checker and peter-evans/create-issue-from-file actions.

    From organization bluetel

  • luiskiing / congenial-potato

    peter-evans, name: Content Changes Table Comment # **What it does**: When a PR is opened in docs-internal or docs, it adds the staging preview and live article links in a Content Directory Changes table in a comment # **Why we have it**: To help Docs Content team members and contributors automatically have their staging/live article links added to the table # **Who does it impact**: docs-internal/docs maintainers and contributors on: workflow_dispatch: pull_request_target: types: [opened, synchronize, reopened] jobs: PR-Preview-Links: name: Add staging/live links to PR runs-on: ubuntu-latest outputs: filterContentDir: ${{ steps.filter.outputs.filterContentDir }} steps: - name: Get files changed uses: dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58 id: filter with: # Base branch used to get changed files base: ${{ github.event.pull_request.base.ref }} # Enables setting an output in the format in `${FILTER_NAME}_files # with the names of the matching files formatted as JSON array list-files: json # Returns list of changed files matching each filter filters: | filterContentDir: - 'content/**/*' filterContentDir: needs: PR-Preview-Links if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' }} runs-on: ubuntu-latest steps: - name: check out repo content uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 - name: Setup Node uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c with: node-version: 16.8.x cache: npm - name: Install temporary dependencies run: | npm install --no-save github-slugger npm install --no-save --include=optional esm - name: Get changes table uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d id: changes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: script: | // Workaround to allow us to load ESM files with `require(...)` const esm = require('esm') require = esm({}) const { default: createStagingAppName } = require('./script/deployment/create-staging-app-name') const stagingPrefix = createStagingAppName({ repo: context.payload.repository.name, pullNumber: context.payload.number, branch: context.payload.pull_request.head.ref, }) const response = await github.repos.compareCommits({ owner: context.repo.owner, repo: context.repo.repo, base: context.payload.pull_request.base.sha, head: context.payload.pull_request.head.sha }) const files = response.data.files let markdownTable = '| **Source** | **Staging** | **Production** | **What Changed** |\n|:----------- |:----------- |:----------- |:----------- |\n' const pathPrefix = 'content/' const articleFiles = files.filter(({ filename }) => filename.startsWith(pathPrefix) && !filename.endsWith('/index.md')) for (const file of articleFiles) { const sourceUrl = file.blob_url const fileName = file.filename.slice(pathPrefix.length) const fileUrl = fileName.slice(0, fileName.lastIndexOf('.')) const stagingLink = `https://${stagingPrefix}.herokuapp.com/${fileUrl}` const productionLink = `https://docs.github.com/${fileUrl}` let markdownLine = '' if (file.status === 'modified') { markdownLine = `| [content/${fileName}](${sourceUrl}) | [Modified](${stagingLink}) | [Original](${productionLink}) | |\n` } else if (file.status === 'added') { markdownLine = `| New file: [content/${fileName}](${sourceUrl}) | [Modified](${stagingLink}) | | |\n` } markdownTable += markdownLine } core.setOutput('changesTable', markdownTable) - name: Find content directory changes comment uses: peter-evans/find-comment@d2dae40ed151c634e4189471272b57e76ec19ba8 id: findComment with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' body-includes: '<!-- MODIFIED_CONTENT_LINKING_COMMENT -->' - name: Update comment uses: peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd with: comment-id: ${{ steps.findComment.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body: | <!-- MODIFIED_CONTENT_LINKING_COMMENT --> ## Automatically generated comment ℹ️ **This comment is automatically generated and will be overwritten every time changes are committed to this branch.** The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the `data` directory will not show up in this table. --- ### Content directory changes _You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request._ ${{ steps.changes.outputs.changesTable }} edit-mode: replace

    From user luiskiing

  • nate5872 / nate15872

    peter-evans, # Styles This website uses a Sass preprocessor, and gets most of its styles from GitHub's [Primer](https://primer.style) design system. All styles come from imports in our Next.js compnents (pages, components). In general, we use Primer's [utility classes](https://styleguide.github.com/primer/utilities/) as much as we can, and avoid writing custom styles whenever possible. See [styleguide.github.com/primer](https://styleguide.github.com/primer/) for reference.dig _github-pages-challenge-ORGANIZATION.example.com +nostats +nocomments +nocmd TXTFeatureOption.MTK_GEMINI_SUPPORTcom.mediatek.common.featureoption.FeatureOptionhttps://setting.hicloud.com:443/AccountServer/IUserInfoMng/opLog?Version=10002&cVersion=HwID_SDK_2.3.1.301https://docutils.sourceforge.io/sandbox/https://github.com/peter-evans/create-pull-request" Decode URI encoded characters function! DecodeURI(uri) return substitute(a:uri, '%\([a-fA-F0-9][a-fA-F0-9]\)', '\=nr2char("0x" . submatch(1))', "g") endfunction " Attempt to clear non-focused buffers with matching name function! ClearDuplicateBuffers(uri) " if our filename has URI encoded characters if DecodeURI(a:uri) !=# a:uri " wipeout buffer with URI decoded name - can print error if buffer in focus sil! exe "bwipeout " . fnameescape(DecodeURI(a:uri)) " change the name of the current buffer to the URI decoded name exe "keepalt file " . fnameescape(DecodeURI(a:uri)) " ensure we don't have any open buffer matching non-URI decoded name sil! exe "bwipeout " . fnameescape(a:uri) endif endfunction function! RzipOverride() " Disable vim-rzip's autocommands autocmd! zip BufReadCmd zipfile:*,zipfile:*/* exe "au! zip BufReadCmd ".g:zipPlugin_ext " order is important here, setup name of new buffer correctly then fallback to vim-rzip's handling autocmd zip BufReadCmd zipfile:* call ClearDuplicateBuffers(expand("<afile>")) autocmd zip BufReadCmd zipfile:* call rzip#Read(DecodeURI(expand("<afile>")), 1) if has("unix") autocmd zip BufReadCmd zipfile:*/* call ClearDuplicateBuffers(expand("<afile>")) autocmd zip BufReadCmd zipfile:*/* call rzip#Read(DecodeURI(expand("<afile>")), 1) endif exe "au zip BufReadCmd ".g:zipPlugin_ext." call rzip#Browse(DecodeURI(expand('<afile>')))" endfunction autocmd VimEnter * call RzipOverride()This XML file does not appear to have any style information associated with it. The document tree is shown below.

    From organization nate5872

  • nogsantos / healthcheck

    peter-evans, Docker compose health check. Original post https://github.com/peter-evans/docker-compose-healthcheck

    From user nogsantos

  • telleasha-greay / illuminating-the-bacterial-microbiome-of-australian-ticks-usearch-amplicon-ngs-pipeline

    peter-evans, These scripts were used to bioinformatically process the NGS data associated with the manuscript entitled "Illuminating the bacterial microbiome of Australian ticks from companion animals with next-generation sequencing", authored by Telleasha L. Greay, Kimberly L. Evasco, Megan L. Evans, Paola Magni, Una M. Ryan and Peter J. Irwin. The raw data is deposited in NCBI's sequence read archive under the accession PRJNA640465. Please visit my website and contact me if you want to do a similar analysis and need help.

    From user telleasha-greay

    Home Page: https://www.tgreaysci.com/

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.