Git Product home page Git Product logo

actions's Introduction

elementary GitHub Actions

  • vala-lint - Run vala-lint on your project.
  • release - Generate Debian changelogs, GitHub releases, and push release tags to your project.
  • gettext-template - Automatically update the translation files of your project (Using a Debian packages).
  • gettext-flatpak - Automatically update the translation files of your project (Using a Flatpak manifest).

actions's People

Contributors

benwaffle avatar btkostner avatar cassidyjames avatar danirabbit avatar davidmhewitt avatar garg-saurav avatar kgrubb avatar ryonakano avatar tintou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions's Issues

PR action to require/encourage some things on a PR

Could require:

  • Class: Changes title format. Wouldn't need to be too clever, just look for a word/phrase and colon at the beginning probably
  • A change to an AppData file. Would need an opt-out when there are no user-facing changes, maybe.
  • No changes to po files (since that's managed by Weblate)
  • Updated screenshot? Would need an opt-out when there are no user-facing changes.
  • …anything else?

The idea is to help us not miss common style/process things.

Release: Add compare links to PRs

Ideally editing the toplevel comment with something like:

---
[Commits Since Last Release](https://github.com/elementary/wingpanel/compare/2.2.5...master)

It would make it easier for reviewers to verify that release appdata contains all the changes etc

Release: Use GitHub automatic release notes

Problem

These changelogs are mostly useful for maintainers and packagers but we're using the user-facing release notes from metainfo. We also now have the problem that the release action doesn't know what to do with the issues tag

Proposal

While the release action has been broken for creating release tags we've been using Github's automatic release notes generation and it's been fine? It does a good enough job just summarizing the commits and it's kinda neat that it has like "so and so made their first commit in this release" kind of stuff. So we probably don't actually need to be doing anything fancy here?

Prior Art (Optional)

See also #24

Release tag failing

What Happened

It looks like tagging releases is broken

Expected Behavior

We should get a release tag on GitHub

Logs

See https://github.com/elementary/gala/runs/3305400983?check_suite_focus=true and in particular:

  "message": "Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param",
87
  "documentation_url": "https://docs.github.com/v3/#oauth2-token-sent-in-a-header"

gettext: Don't require deb-packaging branch existing

AppCenter is going to switch its packaging system from Debian Packaging to Flatpak. So it would be nice if Gettext Actions no longer requires existence of deb-packaging branch.

It seems like required because we use it to install dependencies listed in debian/control

Gettext action should fail if meson returns non 0 exit code.

Prerequisites

  • I have searched open and closed issues for duplicates.

Describe the bug

Action should fail if meson returns non 0 exit code. I got this issue with gettext action. Might affect others too.

Expected behavior

Action should fail.

Additional context

The following action failed to update translation template due to meson.build:37:6: ERROR: Script or command 'meson/post_install.py' not found or not executable, however Action completed with a success response.
https://github.com/arshubham/cipher/commit/cfb48b0d1ff2457b9462878dc5c79971e876f8ef/checks?check_suite_id=313032511

Release: Exclude duplicate lines in Debian changelog

The Release action should not duplicate lines in any given release's Debian changelog. It looks like we can filter the commits in bash somewhere around here:

if [ -z "$FILTERED_COMMITS" ]; then
echo "no changes since last tag, an empty debian changelog will be created."
dch -Mv "$VERSION" "no changes since last release."
else
# Get the first changelog entry
FIRST_CHANGE="$(echo "$FILTERED_COMMITS" | head -n 1)"
# Create a versioned release and add the first line of the changelog
dch -Mv "$VERSION" "$FIRST_CHANGE"
# iterate over any other changelog entries, if there are any
REMAINING_CHANGES="$(echo "$FILTERED_COMMITS"| tail -n +2)"
if [ -n "$REMAINING_CHANGES" ]; then
while read -r line; do
# Append another list item to the changelog
dch -Ma "$line"
done <<< "$REMAINING_CHANGES"
fi
fi

For an example of duplicate lines in a changelog, see: https://github.com/elementary/appcenter/blob/d8d1d80affb6f440d71a896f2fae63772151fb06/debian/changelog#L24-L25

gettext-template: Update POTFILES if there are removed or added files that includes translatable strings

Prerequisites

  • I have searched open and closed issues for duplicates.

Feature

Is your feature request related to a problem? Please describe.
スクリーンショット 2020-06-24 19 36 46
Editing POTFILES is not automated at the moment, so if we forget to update POTFILES when adding/removing files that include translatable strings, Gettext Actions will fail.

Describe the solution you'd like
It would be useful if the Gettext Actions can detect added/removed files from a project, check if they include translatable strings (_(), ngettext (), dgettext (), etc.), and if so remove/add the path to them from POTFILES automatically.

Existing work
N/A

Describe alternatives you've considered
N/A

Additional context
N/A

Specifying 6.0.0 causes the build failing

What Happened

Specifying the version of granite as 6.0.0 in meson.build like this causes the build failing with the following error:

meson.build:25:0: ERROR: Invalid version of dependency, need 'granite' ['>=6.0.0'] found '5.5.0'.

Seems like the package name is libgranite6 but its latest release for odin daily is 5.5.0.

Expected Behavior

The build succeeds (and the CI should pass).

gettext: Use a git credential helper to set token

The GitHub checkout@v2 action sets the credentials on the repo differently, meaning that doing this does not work anymore:

git remote set-url origin https://x-access-token:"$GITHUB_TOKEN"@github.com/"$GITHUB_REPOSITORY".git

This means that the action can no longer push to protected branches using the elementaryBot token.

Reading this suggests that adding a git credential helper instead should be the solution to this problem:
actions/checkout#162

So it looks like we can add something like this instead:

git config credential.https://github.com/.helper "! f() { echo username=x-access-token; echo password=$GITHUB_TOKEN; };f"

Provide AppStream validation

Much like the lint action, it would be handy to provide an AppStream data validation action so we can ensure things are valid before they're merged. Would avoid issues with malformed AppData, missing tags, etc.

Release notes are always absent of build system changes

Describe the bug

I've noticed with how release notes are now being handled they basically never contain information that pertains to changes in the buildsystems/dependencies.

I prime offender would be https://github.com/elementary/wallpapers/releases/tag/5.5.0, which Meson build system support was added and there's no mention of this. This is particularly frusterating for me as a distro maintainer, changes in the build system or dependencies are often the most important information.

I do understand this is performed in a more automated way, so it would be nice if this information could be included again. Otherwise I actually have to manually read the git log for this information on the relevant files.

Thanks. worldofpeace ✨

Generate translation files when strings change

Something we're currently doing manually is follow-up commits that run ninja projectname-pot and ninja projectname-update-po.

It would be nice if we could have an automation that would automatically run these (and their extra counterparts) on commit to master and then commit and push the results if there have been string changes.

We previously discussed in slack that we can determine if there are significant changes because lines we don't care about are all prefixed with a # char

Release: Don't assume changelog is just a list

i.e. see https://github.com/elementary/videos/releases/tag/2.7.0; it was originally created as

  • New features:
  • Option to automatically play next videos
  • Navigate the playlist with the keyboard
  • Add a button to clear the playlist
  • Show audio track language in settings
  • Show playlist item titles in their tooltips
  • Other updates:
  • Show an error for unsupported files
  • Fix disappearing cursor on headerbar
  • Hide seekbar preview when switching windows with Alt + Tab
  • Translation updates

I manually edited it to read

New features:

  • Option to automatically play next videos
  • Navigate the playlist with the keyboard
  • Add a button to clear the playlist
  • Show audio track language in settings
  • Show playlist item titles in their tooltips

Other updates:

  • Show an error for unsupported files
  • Fix disappearing cursor on headerbar
  • Hide seekbar preview when switching windows with Alt + Tab
  • Translation updates

… which better matches the appdata

https://github.com/elementary/videos/blob/81cd005eb4e3fbdd8acd07adbbfed5f3bb83aa04/data/io.elementary.videos.appdata.xml.in#L63-L81

Pre-Build Docker Images

Prerequisites

  • I have searched open and closed issues for duplicates.

Feature

We could possibly speed up a lot of our ci runs by pre-building the actions images, so that each pipeline doesn't have to build the docker image every time (they'd just fetch the existing image). Not sure what kind of performance gains we could get with this, but I think it'd probably be a significant enough speed boost to investigate!

Release: Close related milestone

It would be super convenient if we could also close the related milestone (if it exists).

For example, we release "1.0.0", then we close the milestone named "1.0.0"

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.