Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mcanouil/awesome-quarto
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2022.12.04
Choose a base ref
...
head repository: mcanouil/awesome-quarto
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: mcanouil

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Suggestion
description: Help us improve with suggestions
labels: [suggestion]
labels: ["Type: Suggestion :bulb:"]
assignees: mcanouil
body:
- type: markdown
29 changes: 20 additions & 9 deletions .github/assets/post-item.R
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@ items <- sapply(
"## Tutorials & workshops",
"## Blog posts",
"## Talks and videos",
"## Continuous integration / Continuous deployment"#,
# "## Extensions",
# "## Templates"
"## Continuous integration / Continuous deployment",
"## Extensions",
"## Templates"
),
FUN = function(x, cat) {
if (!x[[1]] %in% cat) return(NULL)
@@ -35,7 +35,7 @@ items <- sapply(
)
items <- c(
paste(
paste("From #AwesomeQuarto:", unlist(items[!sapply(items, is.null)], use.names = FALSE)),
paste("🤖 From #AwesomeQuarto:", unlist(items[!sapply(items, is.null)], use.names = FALSE)),
"#QuartoPub",
sep = "\n"
)
@@ -51,10 +51,9 @@ items[which(over_char > 0)] <- mapply(
x = sprintf(".{%s}\n#QuartoPub$", over_char[which(over_char > 0)] + 4),
y = items[which(over_char > 0)]
)
set.seed(as.numeric(format(Sys.Date(), "%Y%m%d")))
item <- sample(items, 1)

library(rtweet)
# auth_setup_default()
auth <- rtweet::rtweet_bot(
api_key = Sys.getenv("TWITTER_API_KEY"),
api_secret = Sys.getenv("TWITTER_API_KEY_SECRET"),
@@ -63,18 +62,30 @@ auth <- rtweet::rtweet_bot(
)
rtweet::auth_as(auth)

past_tweet <- sub(".*From #AwesomeQuarto: '(.*)' \\(.*", "\\1", unique(grep(
"From #AwesomeQuarto",
get_timeline(user = Sys.getenv("TWITTER_USER"), n = 200)[["full_text"]],
value = TRUE
)))

item <- sample(
items[
!sub(".*From #AwesomeQuarto: '(.*)' \\(.*", "\\1", items) %in% past_tweet
],
1
)

i <- 0
while(inherits(try(rtweet::post_tweet(status = paste("🤖", item))), "try-error") & i < 3) {
while(inherits(try(rtweet::post_tweet(status = item)), "try-error") & i < 3) {
message(sprintf("Try: %s", i))
i <- i + 1
}


# library(rtoot)
# rtoot_token <- rtoot:::get_token_from_envvar()

# i <- 0
# while(inherits(try(rtoot::post_toot(status = paste("🤖", item))), "try-error") & i < 3) {
# while(inherits(try(rtoot::post_toot(status = item)), "try-error") & i < 3) {
# message(sprintf("Try: %s", i))
# i <- i + 1
# }
8 changes: 4 additions & 4 deletions .github/assets/post-release.R
Original file line number Diff line number Diff line change
@@ -46,10 +46,10 @@ auth <- rtweet::rtweet_bot(
rtweet::auth_as(auth)

rtweet::post_tweet(status = paste("🤖", tweet_body))
reply_id <- rtweet::get_my_timeline()[["id_str"]][1]
for (item in items) {
try(rtweet::post_tweet(paste("🤖", item), in_reply_to_status_id = reply_id))
}
# reply_id <- rtweet::get_my_timeline()[["id_str"]][1]
# for (item in items) {
# try(rtweet::post_tweet(paste("🤖", item), in_reply_to_status_id = reply_id))
# }

# library(rtoot)
# rtoot_token <- rtoot:::get_token_from_envvar()
32 changes: 32 additions & 0 deletions .github/workflows/awesome-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Awesome BOT

on:
pull_request:
workflow_dispatch:
push:
branches: main
paths: README.md

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
awesome-bot:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: "checkout repo"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "setup ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true
- name: "install awesome-bot"
run: gem install awesome_bot
- name: "linting: README.md"
run: awesome_bot --allow-redirect --allow-dupe --white-list quarto.org,https://github.com/quarto-dev README.md
28 changes: 5 additions & 23 deletions .github/workflows/awesome-linter.yml
Original file line number Diff line number Diff line change
@@ -8,38 +8,20 @@ on:
paths: README.md

concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
awesome-lint:
strategy:
fail-fast: false
runs-on: ubuntu-latest
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: "checkout repo"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: asdf_install
uses: asdf-vm/actions/install@v1
- name: "linting: README.md"
run: npx -y awesome-lint README.md
awesome-bot:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: "checkout repo"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "setup ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.1
bundler-cache: true
- name: "install awesome-bot"
run: gem install awesome_bot
- name: "linting: README.md"
run: awesome_bot --allow-redirect --allow-dupe --white-list quarto.org,https://github.com/quarto-dev README.md
run: npx -y awesome-lint
32 changes: 0 additions & 32 deletions .github/workflows/post-ads.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/post-item.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/post-release.yml

This file was deleted.

1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

Loading